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

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

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.

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().

References

  • Linardi M, Zhu Y, Palpanas T, Keogh E. VALMOD: A Suite for Easy and Exact Detection of Variable Length Motifs in Data Series. In: Proceedings of the 2018 International Conference on Management of Data - SIGMOD '18. New York, New York, USA: ACM Press; 2018. p. 1757-60.

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

See also

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

Examples

mp <- valmod(mp_toy_data$data[1:200, 1], window_min = 30, window_max = 40, verbose = 0)
# \donttest{
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)
#> 

#> Pruning  [====================>--------]  73% at 39 it/s, elapsed:  0s, eta:  0s
#> 

#> Pruning  [====================>--------]  73% at 38 it/s, elapsed:  0s, eta:  0s
#> 

#> DPs  1   [====================>--------]  73% at 36 it/s, elapsed:  0s, eta:  0s
#> 

#> MASS     [====================>--------]  73% at 35 it/s, elapsed:  0s, eta:  0s
#> 

#> Re Check  [===================>--------]  73% at 35 it/s, elapsed:  0s, eta:  0s
#> 

#> Pruning  [=======================>-----]  82% at 39 it/s, elapsed:  0s, eta:  0s
#> 

#> DPs  5   [=======================>-----]  82% at 36 it/s, elapsed:  0s, eta:  0s
#> 

#> MASS     [=======================>-----]  82% at 36 it/s, elapsed:  0s, eta:  0s
#> 

#> STOMP 2  [=======================>-----]  82% at 36 it/s, elapsed:  0s, eta:  0s
#> 

#> STOMP 3  [=======================>-----]  82% at 35 it/s, elapsed:  0s, eta:  0s
#> 

#> MASS     [=======================>-----]  82% at 35 it/s, elapsed:  0s, eta:  0s
#> 

#> STOMP 2  [=======================>-----]  82% at 35 it/s, elapsed:  0s, eta:  0s
#> 

#> Re Check  [======================>-----]  82% at 35 it/s, elapsed:  0s, eta:  0s
#> 

#> Pruning  [=========================>---]  91% at 39 it/s, elapsed:  0s, eta:  0s
#> 

#> DPs  4   [=========================>---]  91% at 37 it/s, elapsed:  0s, eta:  0s
#> 

#> MASS     [=========================>---]  91% at 37 it/s, elapsed:  0s, eta:  0s
#> 

#> STOMP 2  [=========================>---]  91% at 37 it/s, elapsed:  0s, eta:  0s
#> 

#> MASS     [=========================>---]  91% at 37 it/s, elapsed:  0s, eta:  0s
#> 

#> MASS     [=========================>---]  91% at 36 it/s, elapsed:  0s, eta:  0s
#> 

#> Re Check  [========================>---]  91% at 36 it/s, elapsed:  0s, eta:  0s
#> 

#> Pruning  [=============================] 100% at 40 it/s, elapsed:  0s, eta:  0s
#> 
#> max_number_motifs_found 480
#> min_number_motifs_found 4
#> Finished in 0.28 secs
# join similarity
mp <- valmod(ref_data, query_data, window_min = 30, window_max = 40)
#> 

#> Pruning  [====================>--------]  73% at 38 it/s, elapsed:  0s, eta:  0s
#> 

#> Pruning  [=======================>-----]  82% at 41 it/s, elapsed:  0s, eta:  0s
#> 

#> Pruning  [=======================>-----]  82% at 40 it/s, elapsed:  0s, eta:  0s
#> 

#> DPs  2   [=======================>-----]  82% at 39 it/s, elapsed:  0s, eta:  0s
#> 

#> MASS     [=======================>-----]  82% at 38 it/s, elapsed:  0s, eta:  0s
#> 

#> STOMP 2  [=======================>-----]  82% at 38 it/s, elapsed:  0s, eta:  0s
#> 

#> Re Check  [======================>-----]  82% at 38 it/s, elapsed:  0s, eta:  0s
#> 

#> Pruning  [=========================>---]  91% at 42 it/s, elapsed:  0s, eta:  0s
#> 

#> DPs  1   [=========================>---]  91% at 39 it/s, elapsed:  0s, eta:  0s
#> 

#> MASS     [=========================>---]  91% at 38 it/s, elapsed:  0s, eta:  0s
#> 

#> Re Check  [========================>---]  91% at 38 it/s, elapsed:  0s, eta:  0s
#> 

#> Pruning  [=============================] 100% at 42 it/s, elapsed:  0s, eta:  0s
#> 
#> max_number_motifs_found 438
#> min_number_motifs_found 1
#> Finished in 0.27 secs
# }