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)

Arguments

data

a matrix or a vector.

s_size

an int. Size of snippet.

n_snippets

an int. Number of snippets to find. (Default is 2).

window_size

an int. The size of the sliding window used to compare the data. Must be smaller than s_size. (Default is s_size / 2).

Value

Returns the snippet : a list of n_snippets snippets fraction : fraction of each snippet snippetidx : the location of each snippet within time series

Details

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.

References

  • 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.

Website: https://sites.google.com/site/snippetfinder/

Examples


snippets <- find_snippet(mp_fluss_data$walkjogrun$data[1:300], 40, n_snippets = 2)
#> Error in convert_data(data): Argument `data` cannot be `matrix` and must have a single dimension.Argument `data` cannot be `array` and must have a single dimension.
# \donttest{
snippets <- find_snippet(mp_fluss_data$walkjogrun$data, 120, n_snippets = 3)
#> Error in convert_data(data): Argument `data` cannot be `matrix` and must have a single dimension.Argument `data` cannot be `array` and must have a single dimension.
plot(snippets)
#> Error in plot(snippets): object 'snippets' not found
# }