R/find-snippet.R
find_snippet.Rd
Time Series Snippets tries to solve mainly the common problem of summarization "Show me some representative/typical data". As stated by the original paper, potential uses of snippets are: integrating summarizations of files directly into an operating, production of automatically generated reports, for example, summarize a sleep study and also can be used to support a host of higher-level tasks, including the comparison of massive data collections.
find_snippet(data, s_size, n_snippets = 2L, window_size = s_size/2L)
a matrix
or a vector
.
an int. Size of snippet.
an int
. Number of snippets to find. (Default is 2
).
an int
. The size of the sliding window used to compare the data. Must be smaller
than s_size
. (Default is s_size / 2
).
Returns the snippet : a list of n_snippets snippets fraction : fraction of each snippet snippetidx : the location of each snippet within time series
Motifs vs. snippets: While motifs reward fidelity of conservation, snippets also rewards coverage. Informally, coverage is some measure of how much of the data is explained or represented by a given snippet.
Shapelets vs. snippets: shapelets are defined as subsequences that are maximally representative of a class. Shapelets are supervised, snippets are unsupervised. Shapelets are generally biased to be as short as possible. In contrast, we want snippets to be longer, to intuitively capture the "flavor" of the time series.
Imani S, Madrid F, Ding W, Crouter S, Keogh E. Matrix Profile XIII: Time Series Snippets: A New Primitive for Time Series Data Mining. In: 2018 IEEE International Conference on Data Mining (ICDM). 2018.
Gharghabi S, Imani S, Bagnall A, Darvishzadeh A, Keogh E. Matrix Profile XII: MPdist: A Novel Time Series Distance Measure to Allow Data Mining in More Challenging Scenarios. In: 2018 IEEE International Conference on Data Mining (ICDM). 2018.
snippets <- find_snippet(mp_fluss_data$walkjogrun$data[1:300], 40, n_snippets = 2)
# \donttest{
snippets <- find_snippet(mp_fluss_data$walkjogrun$data, 120, n_snippets = 3)
plot(snippets)
# }