Contenuto principale

DriftAnomaly

R2026b

Synthetic drift anomaly model for validating anomaly detection models

Since R2026a

Description

Add-On Required: This feature requires the Time Series Anomaly Detection for MATLAB add-on.

The DriftAnomaly object specifies the characteristics of a linear, exponential, or quadratic drift anomaly model that you can inject into a time series using injectAnomaly. Name-value argument specifications in injectAnomaly determine the window location and length during which the anomaly occurs.

You create this model using syntheticAnomaly. DriftAnomaly is one type of anomaly model in a set of anomaly objects that you can use to perturb a time series in multiple ways. You can then use this perturbed time series to help validate anomaly detection models against different anomaly types.

Properties

expand all

Drift type, represented as "Linear","Exponential" or "Quadratic".

  • When Type is set to "Linear", injectAnomaly adds a linearly increasing drift over the entire window length that you specify to injectAnomaly, as shown in the following equation.

    y^(n)=y(n)+βn

    Here,

    • y(n) is the original time series.

    • β(n) is the drift scaling value.

    • ŷ(n) is the resulting anomalous time series.

  • When Type is set to "Quadratic", injectAnomaly incorporates a quadratically increasing drift, as shown in the following equation.

    y^(n)=y(n)+βn2

  • When Type is set to "Exponential", injectAnomaly incorporates an exponentially increasing drift, as shown in the following equation.

    y^(n)=y(n)βen

Scaling β for each sample, represented as a numeric scalar.

Object Functions

injectAnomaly Inject anomalies defined by one or more anomaly models into a univariate time series

Version History

Introduced in R2026a