Anomaly Detection

The Anomaly Detection Operator is a low code tool for integrating anomaly detection into any enterprise application.

It uses time series constructive anomaly detection to flag anomalous moments in the data, by time and by ID.

For more information, see the Anomaly Detection section of the ADS documentation.

Input Data

The Anomaly Detection Operator accepts a dataset with:
  • A target column.
  • (Optional) One or more series columns, such that the target is indexed by date/time and series.
  • (Optional) An arbitrary number of extra variables.

Besides this input data, the you can specify validation data, if available. Validation data must have all the columns of the input data plus a binary column titled anomaly. The anomaly column must have a value of minus 1 for anomalous rows and 1 for normal rows.

Finally, provide test_data to receive test metrics and evaluate the Operator's performance more easily. Test data must be indexed by date and (optionally) series. Test data must have a value of minus 1 for anomalous rows and 1 for normal rows.

An anomaly detection job can be configured with the following yaml:
kind: operator
type: anomaly
version: v1
spec:
    input_data:
        url: https://raw.githubusercontent.com/facebook/prophet/main/examples/example_yosemite_temps.csv
    model: autots
    target_column: y
Run the operator with this command:
ads operator run -f anomaly.yaml

Mulitvariate Anomaly Detection

If you have extra variables that you think might be related, then use multivariate anomaly detection. All the extra columns specified in the input data are used in finding if the target column is anomalous.

Auto Model Selection

Operators users don't need to know anything about the underlying models to use them. By default we set model to auto. However, if you want more control over the modeling parameters, set the model parameter to either autots or automlx and then pass parameters directly into model_kwargs.