analyze {tsmp}R Documentation

Runs an appropriate workflow based on the parameters passed in.

Description

The goal of this function is to compute all fundamental algorithms on the provided time series data. See details for more information.

Usage

analyze(
  ts,
  windows = NULL,
  query = NULL,
  sample_pct = 1,
  threshold = 0.98,
  n_jobs = 1L
)

Arguments

ts

a matrix or a vector. The time series to analyze.

windows

an int or a vector. The window(s) to compute the Matrix Profile. Note that it may be an int for a single matrix profile computation or a vector of int for computing the Pan-Matrix Profile.

query

a matrix or a vector. Optional The query to analyze. Note that when computing the Pan-Matrix Profile the query is ignored!

sample_pct

a numeric. A number between 0 and 1 representing how many samples to compute for the Matrix Profile or Pan-Matrix Profile. When it is 1, the exact algorithm is used. (default is 1.0).

threshold

a numeric. Correlation threshold. See details. (Default is 0.98).

n_jobs

an int. The number of cpu cores to use when computing the MatrixProfile. (default is 1).

Details

For now the following is computed:

  1. Matrix Profile - exact or approximate based on sample_pct given that a single windows is provided. By default is the exact algorithm;

  2. Top 3 Motifs;

  3. Top 3 Discords;

  4. Plot Matrix Profile, Motifs and Discords.

When windows is not provided or more than a single window is provided, the Pan-Matrix Profile is computed:

  1. Compute the upper bound when a threshold is provided (it is, by default);

  2. Compute Pan-Matrix Profile for all windows provided, below the upper bound, or a default range when no windows is provided;

  3. Top Motifs;

  4. Top Discords;

  5. Plot Pan-Matrix Profile, motifs and discords.

Value

The appropriate Matrix Profile or Pan-Matrix Profile profile object and also plots the graphics.

References

Website: http://www.cs.ucr.edu/~eamonn/MatrixProfile.html

See Also

Other Main API: compute(), discords(), motifs(), visualize()

Examples


# Matrix Profile
result <- analyze(mp_toy_data$data[, 1], 80)

# Pan Matrix Profile
result <- analyze(mp_toy_data$data[, 1])


[Package tsmp version 0.4.15 Index]