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.
Arguments
- pre_obj
Required. This is the object resulting from
mass_pre(). The is no MASS without a pre.- data
Required. Any 1-dimension series of numbers (
matrix,vector,tsetc.)- query
Optional. Accepts the same types as
dataand is used for join-similarity. Defaults todatafor self-similarity. IMPORTANT Use the same data used onmass_pre().- index
An
integer. This is the index of the rolling window that will be used. Must be between1andlength(data) - window_size + 1.- version
A
string. Chooses the version of MASS what will be used. Ignored ifmass_pre()is not the "normalized" type.- n_workers
An
integer. The number of threads used for computing. Defaults to1. For parallel execution across processes, prefer a PSOCK cluster and usen_workers = 1within each worker. See matrixprofiler for fork limitations.- 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
typeisweighted, and has to be the same size as thewindow_size.
Value
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().
Details
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.
