Main Content

Distance Profiling Methods

Use distance methods to detect unusual behavior

Anomaly detection is the process of identifying signal anomalies by detecting deviations from normal behavior.

One approach to anomaly detection is using distance methods, which base anomaly detection on pattern matching within the time series data. This pattern matching is based on the z-normalized Euclidean distances among subsequences.

Distance methods allow you to identify common recurring subsequences (motifs) that typically indicate normal operation and unique subsequences (discords) that indicate possible anomalies.

Distance methods are especially useful because they are relatively simple. The methods require no trained models or labeled data. They can detect anomalous deviations in the data itself for any type of anomalous behavior, whether characterized previously or not. The algorithms for these methods are optimized for fast computation.

Functions

similarityDistanceCompute distance profile between query and time series subsequences (Since R2024b)
distanceProfileCompute distance profile of the distances between a query subsequence and all other subsequences of a time series (Since R2024b)
matrixProfile Compute matrix profile between all pairs of subsequences in a single-variable or multivariable time series (Since R2024b)
findDiscordFind the locations of top discords from the matrix profile of a time series (Since R2024b)
findMotifFind the locations of top motif pairs from the matrix profile of a time series (Since R2025a)

Topics