contrast | R Documentation |
Computes the contrast profile of two (classes of) time series.
contrast( negative_data, positive_data, window_size, positive_matrix = NULL, exclusion_zone = 0.5, distance = c("euclidean", "pearson"), n_workers = 1L, progress = TRUE )
negative_data |
Required. Any 1-dimension series of numbers ( |
positive_data |
Required. Any 1-dimension series of numbers ( |
window_size |
Required. An integer defining the rolling window size. |
positive_matrix |
Optional. A precomputed self-similar matrix profile of the positive data. |
exclusion_zone |
A numeric. Defines the size of the area around the rolling window that will be ignored to avoid
trivial matches. Default is |
distance |
A string. Currently accepts |
n_workers |
An integer. The number of threads using for computing. Defaults to |
progress |
A logical. If |
This algorithm returns the contrast profile of two time series, which shows the position of patters that are similar in the positive data, but at the same time very dissimilar in the negative data. In other words, this means that such a pattern represents well positive data and may be taken as a "signature" of that class. More information can be found in the references.
Returns a list
with the contrast_profile
, plato
, plato_nn
, plato_idx
, plato_nn_idx
, w
, ez
, euclidean
values
R. Mercer, S. Alaee, A. Abdoli, S. Singh, A. Murillo and E. Keogh, "Matrix Profile XXIII: Contrast Profile: A Novel Time Series Primitive that Allows Real World Classification," 2021 IEEE International Conference on Data Mining (ICDM), 2021, pp. 1240-1245, doi: 10.1109/ICDM51629.2021.00151.
Website: http://www.cs.ucr.edu/~eamonn/MatrixProfile.html
cp <- contrast(motifs_discords_small, rev(motifs_discords_small), 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.