MatrixProfile.expected_arc
— Methodexpectedarc(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_profile
— Methodprofile = matrix_profile(A, T, m, dist=ZEuclidean(); showprogress=true)
Mutual matrix profile between A
and T
.
MatrixProfile.matrix_profile
— Methodprofile = 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.motifs
— Functionmotifs(p::Profile, k, found_motifs = Motif[]; r=2, th = p.m, dist = ZEuclidean())
k
is the number of motifs to extractr
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.mpdist
— Functionmpdist(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 k
th smallest value.
MatrixProfile.mpdist
— Methodmpdist(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_profile
— Functionmpdist_profile(A::AbstractVector, B::AbstractVector, m::Int, [d = ZEuclidean()])
MP distance profile between two time series using window length m
.
MatrixProfile.mpdist_profile
— Methodmpdist_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.segment
— Methodi = 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_profile
— Methodsegment_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.snippets
— Functionsnippets(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.