Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multi-category filtering of results #107

Merged
merged 17 commits into from
Nov 1, 2021

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Oct 28, 2021

Description

This PR adds support for filtering results on a subset of categorical fields. For example, if a user has 2 categorical fields selected, they can now search for the top values of one field, ignoring the other. And, when selecting a value of one of these fields, a sorted list of the top values of the other field is displayed for viewing on the anomaly and feature charts. This is supported for both real-time and historical scenarios.

The primary changes in this PR include:

  • Adding support for new multi-category filtering API (see backend PR)
  • Adding a combo box filter at the top of the charts to select some subset of categorical fields, rather than a hardcoded string that includes all of the fields.
  • Adding a combo box filter when a heatmap cell is selected, to select multiple values to display on the charts.
  • Adding support for multiple time series on the anomaly charts and feature charts.
  • Moving anomaly filtering / sorting logic from the child components into the base container (AnomalyHistory), making them more stateless as components should be.
  • Minor changes to the entity list format in the heatmap cell. Changed from Entities: <entity-value-1>, <entity-value-2> => Entities: <entity-name-1>: <entity-value1>, <entity-name-2>: <entity-value-2>. The main reason for this change is so the full entity information can be passed to the child components when needed - before, only the values were being passed.
  • Fixing bucketized results - previous code had a bug where bucketized results weren't being retrieved properly. That has been fixed here, which also meant more logic needed to be added to handle zooming from bucketized results => non-bucketized results.
  • Misc. other cleanup (fixed stale data occasionally showing up on feature and details charts, fixed sample anomaly zoom state bug, separated logic of sample vs. non-sample data in heatmap chart, added comments for existing vars or methods that weren't clear, renamed many vars and methods to make them more clear)

Testing:

  • All UT pass
  • All IT pass
  • Confirmed it is consistent for real-time and historical
  • Confirmed nothing breaks on non-high-cardinality & high-cardinality-single-category detector results
  • Confirmed nothing breaks on sample anomalies via preview

Screenshots:

New combo box filter for categorical fields:
Screen Shot 2021-10-28 at 12 57 11 PM

New combo box filter for child categorical field values (when a heatmap cell is selected):
Screen Shot 2021-10-28 at 12 57 42 PM

Multi-time-series support, with consistent coloring for anomaly & feature results:
Screen Shot 2021-10-28 at 12 58 08 PM

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@ohltyler ohltyler added v1.2.0 Version 1.2.0 feature A new feature for the plugin labels Oct 28, 2021
ylwu-amzn
ylwu-amzn previously approved these changes Nov 1, 2021
amitgalitz
amitgalitz previously approved these changes Nov 1, 2021
@ohltyler ohltyler dismissed stale reviews from amitgalitz and ylwu-amzn via 677651f November 1, 2021 21:26
@ohltyler ohltyler merged commit 052ff2a into opensearch-project:main Nov 1, 2021
ohltyler added a commit to ohltyler/anomaly-detection-dashboards-plugin-1 that referenced this pull request Nov 8, 2021
Signed-off-by: Tyler Ohlsen ohltyler@amazon.com
ohltyler added a commit that referenced this pull request Nov 9, 2021
Signed-off-by: Tyler Ohlsen ohltyler@amazon.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature for the plugin v1.2.0 Version 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants