This algorithm will use a rolling window, to computes the distance thorough the whole data. This means that the
minimum distance found is the motif and the maximum distance is the discord on that time series. Attention
you need first to create an object using mass_pre()
. Read below.
mass( pre_obj, data, query = data, index = 1, version = c("v3", "v2"), n_workers = 1 ) mass_pre( data, window_size, query = NULL, type = c("normalized", "non_normalized", "absolute", "weighted"), weights = NULL )
pre_obj | Required. This is the object resulting from |
---|---|
data | Required. Any 1-dimension series of numbers ( |
query | Optional. Accepts the same types as |
index | An |
version | A |
n_workers | An |
window_size | Required. An integer defining the rolling window size. |
type | This changes how the MASS algorithm will compare the rolling window and the data. (See details). |
weights | Optional. It is used when the |
mass()
returns a list
with the distance_profile
and the last_product
that is only useful for computing the
Matrix Profile.
mass_pre()
returns a list
with several precomputations to be used on MASS later. Attention use this before
mass()
.
There are currently four ways to compare the window with the data:
normalized: this normalizes the data and the query window. This is the most frequently used.
non_normalized: this won't normalize the query window. The data still being normalized.
absolute: this won't normalize both the data and the query window.
weighted: this normalizes the data and query window, and also apply a weight vector on the query.
pre <- mass_pre(motifs_discords_small, 50) dist_profile <- mass(pre, motifs_discords_small) pre <- mass_pre(motifs_discords_small, 50) dist_profile <- mass(pre, motifs_discords_small)