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.

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.
injectAnomalyadds a linearly increasing drift over the entire window length that you specify toinjectAnomaly, as shown in the following equation.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
Object Functions
injectAnomaly | Inject anomalies defined by one or more anomaly models into a univariate time series |
Version History
Introduced in R2026a