distanceProfile
Compute distance profile of the distances between a query subsequence and all other subsequences of a time series
Since R2024b
Syntax
Description
Return Distance Profile
returns the distance profile of a specified query subsequence within the time series
DP = distanceProfile(X,len,loc)X. The distance profile is a vector or
matrix of z-normalized Euclidean distances between the query and every subsequence in
X with the same length len. A small distance
indicates that the query and the subsequence are a close match. A large distance indicates
that the query and the subsequence are very different.
If
Xis a vector, thendistanceProfiletreats it as a single channelIf
Xis a matrix, then you can specify whetherdistanceProfilecomputes the distance profile for each time series channel individually or cumulatively by specifyingType. For more information, seeType.
The query begins at the time series position loc. The query
subsequence is defined by whether X is a vector or a matrix:
Vector —
X(loc:loc+len-1)Matrix with k columns —
X(loc:loc+len-1,k).
[___] = distanceProfile(___,
specifies additional options using one or more name-value arguments. For example, to
exclude matches that are near the query starting position in the time series, set
Name=Value)ExcludeTrivialMatches to true.
Plot Distance Profile
distanceProfile(___) creates an interactive plot of
the distance profile, with overlays for the query, the motif (the best match to the
query), and the discord (the worst match to the query). You can move the vertical
selection lines in the plot to find the top motif and discord of any other subsequences in
the time series.
You can use this syntax with any of the previous input argument combinations.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
References
[1] Yeh, Chin-Chia Michael, et al. “Matrix Profile I: All Pairs Similarity Joins for Time Series: A Unifying View That Includes Motifs, Discords and Shapelets.” 2016 IEEE 16th International Conference on Data Mining (ICDM), IEEE, 2016, pp. 1317–22. DOI.org (Crossref), https://doi.org/10.1109/ICDM.2016.0179.
Extended Capabilities
Version History
Introduced in R2024b
