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

  1. Create a dashboard .json file:
    
   {
    "cards": [],
    "title": "Robot - Speed",
    "timeGrain": "hour",
    "description": "Detect speed anomalies",
    "layouts": {}
   }
  1. Create a Line card that shows an input anomaly score and add it to the dashboard. In the dataSource object, 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"
            }
        }
    }
    						
  2. 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"
            }
        }
    }
    						
  3. Add the input metric that is being analyzed by the model to the line graph. In the following example, speed is 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"
            }
        }
    }
    						
  4. View the anomaly scores and the input data in the graph.
  5. 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.
    1. Study the graph to determine where anomalies occur in the input data.
    2. Check each anomaly score and determine whether a high score is recorded where the anomalies occur.
    3. Determine which anomaly score is best suited to detecting anomalies in the input data.
  6. 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 100 is a realistic threshold value for the spectral anomaly score.