You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default=iota// Default is the default annotation vector of all ones
18
-
Complexity// Complexity is the annotation vector that focuses on areas of high "complexity"
19
-
MeanStd// MeanStd is the annotation vector focusing on areas where the signal is within a standard deviation of the mean
20
-
Clipping// Clipping is the annotation vector reducing the importance of areas showing clipping effects on the positive and negative regime
17
+
DefaultAV="default"// Default is the default annotation vector of all ones
18
+
ComplexityAV="complexity"// Complexity is the annotation vector that focuses on areas of high "complexity"
19
+
MeanStdAV="mean_std"// MeanStd is the annotation vector focusing on areas where the signal is within a standard deviation of the mean
20
+
ClippingAV="clipping"// Clipping is the annotation vector reducing the importance of areas showing clipping effects on the positive and negative regime
21
21
)
22
22
23
23
// Create returns the annotation vector given an input time series and a window size m
Copy file name to clipboardExpand all lines: matrixprofile.go
+25-25Lines changed: 25 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -26,22 +26,22 @@ import (
26
26
// for a given timeseries of length N and subsequence length of M. The profile
27
27
// and the profile index are stored here.
28
28
typeMatrixProfilestruct {
29
-
A []float64// query time series
30
-
B []float64// timeseries to perform full join with
31
-
AMean []float64// sliding mean of a with a window of m each
32
-
AStd []float64// sliding standard deviation of a with a window of m each
33
-
BMean []float64// sliding mean of b with a window of m each
34
-
BStd []float64// sliding standard deviation of b with a window of m each
35
-
BF []complex128// holds an existing calculation of the FFT of b timeseries
36
-
Nint// length of the timeseries
37
-
Mint// length of a subsequence
38
-
SelfJoinbool// indicates whether a self join is performed with an exclusion zone
39
-
MP []float64// matrix profile
40
-
Idx []int// matrix profile index
41
-
MPB []float64// matrix profile for the BA join
42
-
IdxB []int// matrix profile index for the BA join
43
-
AV av.AV// type of annotation vector which defaults to all ones
44
-
Opts*MPOptions// options used for the computation
29
+
A []float64`json:"a"`// query time series
30
+
B []float64`json:"b"`// timeseries to perform full join with
31
+
AMean []float64`json:"a_mean"`// sliding mean of a with a window of m each
32
+
AStd []float64`json:"a_std"`// sliding standard deviation of a with a window of m each
33
+
BMean []float64`json:"b_mean"`// sliding mean of b with a window of m each
34
+
BStd []float64`json:"b_std"`// sliding standard deviation of b with a window of m each
35
+
BF []complex128`json:"b_fft"`// holds an existing calculation of the FFT of b timeseries
36
+
Nint`json:"n"`// length of the timeseries
37
+
Mint`json:"w"`// length of a subsequence
38
+
SelfJoinbool`json:"self_join"`// indicates whether a self join is performed with an exclusion zone
39
+
MP []float64`json:"mp"`// matrix profile
40
+
Idx []int`json:"pi"`// matrix profile index
41
+
MPB []float64`json:"mp_ba"`// matrix profile for the BA join
42
+
IdxB []int`json:"pi_ba"`// matrix profile index for the BA join
43
+
AV av.AV`json:"annotation_vector"`// type of annotation vector which defaults to all ones
44
+
Opts*MPOptions`json:"options"`// options used for the computation
45
45
}
46
46
47
47
// New creates a matrix profile struct with a given timeseries length n and
@@ -283,19 +283,19 @@ func MPDist(a, b []float64, m int, o *MPOptions) (float64, error) {
283
283
typeAlgostring
284
284
285
285
const (
286
-
AlgoSTOMPAlgo="STOMP"
287
-
AlgoSTAMPAlgo="STAMP"
288
-
AlgoSTMPAlgo="STMP"
289
-
AlgoMPXAlgo="MPX"
286
+
AlgoSTOMPAlgo="stomp"
287
+
AlgoSTAMPAlgo="stamp"
288
+
AlgoSTMPAlgo="stmp"
289
+
AlgoMPXAlgo="mpx"
290
290
)
291
291
292
292
// MPOptions are parameters to vary the algorithm to compute the matrix profile.
293
293
typeMPOptionsstruct {
294
-
AlgorithmAlgo// choose which algorithm to compute the matrix profile
295
-
Samplefloat64// only applicable to algorithm STAMP
296
-
Parallelismint
297
-
Euclideanbool// defaults to using euclidean distance instead of pearson correlation for matrix profile
298
-
RemapNegCorrbool// defaults to no remapping. This is used so that highly negatively correlated sequences will show a low distance as well.
294
+
AlgorithmAlgo`json:"algorithm"`// choose which algorithm to compute the matrix profile
295
+
Samplefloat64`json:"sample_pct"`// only applicable to algorithm STAMP
296
+
Parallelismint`json:"parallelism"`
297
+
Euclideanbool`json:"euclidean"`// defaults to using euclidean distance instead of pearson correlation for matrix profile
298
+
RemapNegCorrbool`json:"remap_negative_correlation"`// defaults to no remapping. This is used so that highly negatively correlated sequences will show a low distance as well.
0 commit comments