Adding unsupervised anomaly models to a dashboard
Create a dashboard that plots the input data and the anomaly model scores over time. Follow the same steps for all new unsupervised anomaly models that you add.
Steps
- Create a dashboard .json file:
{
"cards": [],
"title": "Robot - Speed",
"timeGrain": "hour",
"description": "Detect speed anomalies",
"layouts": {}
}
- Create a Line card that shows an
input anomaly score and add it to the dashboard. In the
dataSourceobject, exclude an aggregation method to show input data, for example:{ "id": "speed_detectors_loadID", "size": "LARGE", "title": " Speed - anomaly detection", "type": "TIMESERIES", "content": { "series": [ { "dataSourceId": "spectral_speed_ID", "label": "spectral" } ] }, "dataSource": { "attributes": [ { "attribute": "spectral_speed", "id": "spectral_speed_ID" } ], "range": { "type": "rolling", "count": -3, "interval": "hour" } } } - Add the other anomaly models that you created to the line graph. For example:
{ "id": "speed_detectors_ID", "size": "LARGE", "title": " Speed - anomaly detection", "type": "TIMESERIES", "content": { "series": [ { "dataSourceId": "spectral_speed_ID", "label": "spectral" }, { "dataSourceId": "fft_speed_ID", "label": "fft" }, { "dataSourceId": "kmeans_speed_ID", "label": "kmeans" }, { "dataSourceId": "saliency_speed_ID", "label": "saliency" } ] }, "dataSource": { "attributes": [ { "attribute": "spectral_speed", "id": "spectral_speed_ID" }, { "attribute": "fft_speed", "id": "fft_speed_ID" }, { "attribute": "kmeans_speed", "id": "kmeans_speed_ID" }, { "attribute": "saliency_speed", "id": "saliency_speed_ID" } ], "range": { "type": "rolling", "count": -3, "interval": "hour" } } } - Add the input metric that is being analyzed by the model to the line graph. In the following
example,
speedis added:{ "id": "speed_detectors_ID", "size": "LARGE", "title": " Speed - anomaly detection", "type": "TIMESERIES", "content": { "series": [ { "dataSourceId": "spectral_speed_ID", "label": "spectral" }, { "dataSourceId": "fft_speed_ID", "label": "fft" }, { "dataSourceId": "kmeans_speed_ID", "label": "kmeans" }, { "dataSourceId": "saliency_speed_ID", "label": "saliency" }, { "dataSourceId": "speed_ID", "label": "speed" } ] }, "dataSource": { "attributes": [ { "attribute": "spectral_speed", "id": "spectral_speed_ID" }, { "attribute": "fft_speed", "id": "fft_speed_ID" }, { "attribute": "kmeans_speed", "id": "kmeans_speed_ID" }, { "attribute": "saliency_speed", "id": "saliency_speed_ID" }, { "attribute": "speed", "id": "speed_ID" } ], "range": { "type": "rolling", "count": -3, "interval": "hour" } } } - View the anomaly scores and the input data in the graph.
- Filter the graph to show individual anomaly score and the input metric that is under analysis.
Click the name of the series in the legend to filter the graph.
- Study the graph to determine where anomalies occur in the input data.
- Check each anomaly score and determine whether a high score is recorded where the anomalies occur.
- Determine which anomaly score is best suited to detecting anomalies in the input data.
- Determine what initial threshold value to use for the input data for the model you select. For
example, you might find that a score of
100is a realistic threshold value for the spectral anomaly score.