主要内容

PointOutliersAnomaly

Synthetic point outliers 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 PointOutliersAnomaly object specifies the characteristics of a anomaly model represented by outlying points 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. PointOutliersAnomaly 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.

Plot of a point outlier anomaly within a constant signal. The anomaly contains positive and negative excursions that start at 250, in the center of the plot.

When you specify a PointOutliersAnomaly object, injectAnomaly adds a set of outlier points that have a uniform random distribution for both magnitude and location of the points within the anomaly window.

  • 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)+j=1Nβ(2Xjn)

    Here,

    • y(n) is the original time series.

    • β(n) is the scaling value.

    • N is the number of points.

    • j contains the uniformly distributed indices of the points within the anomaly window.

    • X contains the uniformly distributed magnitudes of the points.

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

Properties

expand all

Point Outliers

Number of point outliers to inject into the time series window, specified as an integer.

Outlier scale used to control the magnitude of outliers at each injection point, specified 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