valmod: Variable Length Motif Discovery

Description Usage Arguments Details Value References See Also Examples

View source: R/valmod.R

Description

Computes the Matrix Profile and Profile Index for a range of query window sizes

Usage

1
2
3
4
5
6
7
8
9
valmod(
  ...,
  window_min,
  window_max,
  heap_size = 50,
  exclusion_zone = getOption("tsmp.exclusion_zone", 1/2),
  lb = TRUE,
  verbose = getOption("tsmp.verbose", 2)
)

Arguments

...

a matrix or a vector. If a second time series is supplied it will be a join matrix profile.

window_min

an int. Minimum size of the sliding window.

window_max

an int. Maximum size of the sliding window.

heap_size

an int. (Default is 50). Size of the distance profile heap buffer

exclusion_zone

a numeric. Size of the exclusion zone, based on window size (default is 1/2). See details.

lb

a logical. (Default is TRUE). If FALSE all window sizes will be calculated using STOMP instead of pruning. This is just for academic purposes.

verbose

an int. See details. (Default is 2).

Details

This algorithm uses an exact algorithm based on a novel lower bounding technique, which is specifically designed for the motif discovery problem. verbose changes how much information is printed by this function; 0 means nothing, 1 means text, 2 adds the progress bar, 3 adds the finish sound. exclusion_zone is used to avoid trivial matches; if a query data is provided (join similarity), this parameter is ignored.

Paper that implements skimp() suggests that window_max / window_min > than 1.24 begins to weakening pruning in valmod().

Value

Returns a Valmod object, a list with the matrix profile mp, profile index pi left and right matrix profile lmp, rmp and profile index lpi, rpi, best window size w for each index and exclusion zone ez. Additionally: evolution_motif the best motif distance per window size, and non-length normalized versions of mp, pi and w: mpnn, pinn and wnn.

References

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

See Also

Other matrix profile computations: mstomp_par(), scrimp(), stamp_par(), stomp_par(), tsmp()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mp <- valmod(mp_toy_data$data[1:200, 1], window_min = 30, window_max = 40, verbose = 0)
## Not run: 
ref_data <- mp_toy_data$data[, 1]
query_data <- mp_toy_data$data[, 2]
# self similarity
mp <- valmod(ref_data, window_min = 30, window_max = 40)
# join similarity
mp <- valmod(ref_data, query_data, window_min = 30, window_max = 40)

## End(Not run)

franzbischoff/tsmp documentation built on March 9, 2020, 6:01 a.m.