MatrixProfile.expected_arcMethod

expectedarc(i,n) this polynomial indicates the expected number of NN-arcs that would pass over index i for a series of lengthn if the series was completely random. This is used to normalize the `segmentprofile` to account for bias towards the edges.

MatrixProfile.matrix_profileMethod
profile = matrix_profile(A, T, m, dist=ZEuclidean(); showprogress=true)

Mutual matrix profile between A and T.

MatrixProfile.matrix_profileMethod
profile = matrix_profile(T, m, [dist = ZEuclidean()]; showprogress=true)

Return the matrix profile and the profile indices of time series T with window length m. See fields profile.P, profile.I. You can also plot the profile. If dist = ZEuclidean() the STOMP algorithm will be used.

Reference: Matrix profile II.

MatrixProfile.motifsFunction
motifs(p::Profile, k, found_motifs = Motif[]; r=2, th = p.m, dist = ZEuclidean())
  • k is the number of motifs to extract
  • r controls how similar two windows must be to belong to the same motif. A higher value leads to more windows being grouped together.
  • th is a threshold on how nearby in time two motifs are allowed to be.

Also see the function anomalies(profile) to find anomalies in the data, sometimes called discords.

MatrixProfile.mpdistFunction
mpdist(A, B, m, d = ZEuclidean, k = ((length(A) + length(B)) - 2m) ÷ 20)

The MP distance between A and B using window length M and returning the kth smallest value.

MatrixProfile.mpdistMethod
mpdist(MP::AbstractArray, th::Real, N::Int)

The MP distance given a precomputed matrix profile, calculating k as th*N where N is the length of the data used to create MP.

MatrixProfile.mpdist_profileFunction
mpdist_profile(A::AbstractVector, B::AbstractVector, m::Int, [d = ZEuclidean()])

MP distance profile between two time series using window length m.

MatrixProfile.mpdist_profileMethod
mpdist_profile(T::AbstractVector, S::Int, m::Int, [d])

All MP distance profiles between subsequences of length S in T using internal window length m.

MatrixProfile.segmentMethod
i = segment(p::Profile)

Returns an index i indicating the most likely segmentation point of profile p, i.e., the point which the fewst nearest-neighbor arcs passes over.

Ref: Matrix Profile VIII: Domain Agnostic Online Semantic Segmentation at Superhuman Performance Levels

MatrixProfile.segment_profileMethod
segment_profile(p::Profile)

Calculate the MP-index of a matrix profile. This index has the same length as the profile, and tells you how many nearest-neighbor arcs passes over index i. It's normalized by the expected number of arcs for a completely random time series, so that a value of 1 indicates a poor segmentation point, and a value close to 0 indicates a likely segmentation point.

MatrixProfile.snippetsFunction
snippets(T, k, S; m = max(S ÷ 10, 4))

Summarize time series T by extracting k snippets of length S The parameter m controls the window length used internally.