Skip to contents

For each subsequence of length window, the z-normalised Euclidean distance to its nearest non-trivial neighbour, computed by the exact self-join of Yeh et al. (2016). The profile's maximum locates the discord and its minimum locates the motif pair.

Usage

morie_matrxP(x, window)

Arguments

x

Numeric series.

window

Subsequence length; needs \(2 <= window <= length(x)/2\).

Value

A list with profile, index (1-based nearest neighbour of each subsequence), discord, discord_distance, motif (the pair of 1-based starts), motif_distance, window, estimate, n, method.

References

Yeh, C.-C. M. et al. (2016). Matrix profile I: all pairs similarity joins for time series. ICDM 2016, 1317-1322.

Examples

morie_matrxP(x = c(1, 2, 3, 4, 5, 6, 7, 8), window = 3L)
#> $profile
#> [1] 0 0 0 0 0 0
#> 
#> $index
#> [1] 5 5 5 6 1 1
#> 
#> $discord
#> [1] 1
#> 
#> $discord_distance
#> [1] 0
#> 
#> $motif
#> [1] 1 5
#> 
#> $motif_distance
#> [1] 0
#> 
#> $window
#> [1] 3
#> 
#> $estimate
#> [1] 1
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Matrix profile self-join (Yeh et al. 2016)"
#>