Examples

The main functionality of dtaianomaly is to detect anomalies in time series data. Within dtaianomaly, a time series is represented as a Numpy-array of shape (n_samples, n_attributes), in which n_samples equals the number of measurements or observations in the time series, and n_attributes equals the number of variables that are being measured.

Example

Assume you have an accelerometer which measures the acceleration in the X, Y and Z direction with a sampling frequency of 100Hz (100 samples per second), measured over 15 seconds. The corresponding time series is a numpy array of shape (100*15, 3), which equals (1500, 3).

Specifically, dtaianomaly has the following three key features, which are described in more detail below:

  1. State-of-the-art time series anomaly detection via a simple API.

  2. Develop custom models for anomaly detection.

  3. Quantitative evaluation of time series anomaly detection.

Anomaly detection

The most important functionality of dtaianomaly is to detect anomalies in time series. Multiple state-of-the-art time series anomaly detectors are implemented in dtaianomaly, which can all be applied through a simple API, similar to scikit-learn. This means it only takes a few lines of code to detect anomalies in your time series! For more information regarding the anomaly detection API, we refer to the anomaly detection module.

See also

Check out the anomaly detection example for more information!

Custom models

A key design philosophy of dtaianomaly is to easily implement custom components. This can be a new anomaly detector being developed, some preprocessing step for your time series data, or an evaluation metric which takes application specific KPIs into account. For this, you only need to implement your component as a child of the type of component you are implementing (e.g., BaseDetector to implement an anomaly detector), after which the component can be used is if it is natively a part of dtaianomaly.

See also

Check out the extensibility example for more information!

Quantitative evaluation with a workflow

Oftentimes we need to select the best anomaly detector. For this, it is necessary to perform a quantitative evaluation of the anomaly detectors, after which the detector with highest performance can be chosen. To simply evaluate multiple anomaly detectors with different preprocessing steps on multiple datasets, and to measure different evaluation metrics, dtaianomaly offers the Workflow. All you need to do is initialize the different components, pass them to the Workflow, and call the run() method evaluate the anomaly detectors!

See also

Check out the workflow example for more information!