Documentation ¶
Overview ¶
Package util is a set of utility functions that are used throughout the matrixprofile package.
Index ¶
- func ApplyExclusionZone(profile []float64, idx, zoneSize int)
- func BinarySplit(lb, ub int) []int
- func E2P(mp []float64, w int)
- func MovMeanStd(ts []float64, m int) ([]float64, []float64, error)
- func MuInvN(a []float64, w int) ([]float64, []float64)
- func P2E(mp []float64, w int)
- func Sum2s(a []float64, w int) []float64
- func ZNormalize(ts []float64) ([]float64, error)
- type Batch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyExclusionZone ¶
ApplyExclusionZone performs an in place operation on a given matrix profile setting distances around an index to +Inf
func BinarySplit ¶ added in v0.3.4
func E2P ¶ added in v0.4.1
E2P converts a slice of euclidean distances to pearson correlation values. This is only valid for z-normalized time series. Negative pearson correlation values will not be discovered
func MovMeanStd ¶
MovMeanStd computes the mean and standard deviation of each sliding window of m over a slice of floats. This is done by one pass through the data and keeping track of the cumulative sum and cumulative sum squared. s between these at intervals of m provide a total of O(n) calculations for the standard deviation of each window of size m for the time series ts.
func P2E ¶ added in v0.4.0
P2E converts a slice of pearson correlation values to euclidean distances. This is only valid for z-normalized time series.
func ZNormalize ¶
ZNormalize computes a z-normalized version of a slice of floats. This is represented by y[i] = (x[i] - mean(x))/std(x)
Types ¶
type Batch ¶ added in v0.3.6
Batch indicates which index to start at and how many to process from that index.
func DiagBatchingScheme ¶ added in v0.3.6
DiagBatchingScheme computes a more balanced batching scheme based on the diagonal nature of computing matrix profiles. Later batches get more to work on since those operate on less data in the matrix.