TSDistancesMatrix: Distance Matrix for Time Series

View source: R/TSDistancesMatrix.R

TSDistancesMatrixR Documentation

Distance Matrix for Time Series

Description

Generates a Distance Matrix for Time Series data

Usage

TSDistancesMatrix(TSMatrix,method='euclidean')

Arguments

TSMatrix

[1:n,1:m] matrix of m different Time Series with equal length n

method

Distance measure to be used. It must be one of: "euclidean", "manhattan", "minkowski", "infnorm", "ccor", "sts", "dtw", "keogh.lb", "edr", "erp", "lcss", "fourier", "tquest", "dissim", "acf", "pacf", "ar.lpc.ceps", "ar.mah", "ar.mah.statistic", "ar.mah.pvalue", "ar.pic", "cdm", "cid", "cor", "cort", "wav", "int.per", "per", "mindist.sax", "ncd", "pred", "spec.glk", "spec.isd", "spec.llr", "pdc", "frechet"

Details

"Shapebased methods [e.g. Euclidean, DTW] compare the overall appearance of the time series. Feature-based methods extract features that usually describing time independent aspects of the series that are compared with static distance functions. Model-based methods fit a model to the data and measure the similarity by comparing the models. Compression-based methods [e.g. cdm] analyze how well two time series can be compressed alone and together." [Mörchen, 2006]

"For long time series of possibly very different lengths, the shape-based methods do not give intuitive results, feature- [e.g. fourier] and model-based [e.g. acf] methods should be considered" [Mörchen, 2006]

For Distances measures description see TSdist CRAN package (here cited below):

  • "euclidean": Euclidean distance.

  • "manhattan": Manhattan distance.

  • "minkowski": Minkowski distance.

  • "infnorm": Infinite norm distance.

  • "ccor": Distance based on the cross-correlation.

  • "sts": Short time series distance.

  • "dtw": Dynamic Time Warping distance. . Uses the dtw package

  • "lb.keogh": LB_Keogh lower bound for the Dynamic Time Warping distance.

  • "edr": Edit distance for real sequences.

  • "erp": Edit distance with real penalty.

  • "lcss": Longest Common Subsequence Matching.

  • "fourier": Distance based on the Fourier Discrete Transform.

  • "tquest": TQuest distance.

  • "dissim": Dissim distance.

  • "acf": Autocorrelation-based dissimilarity . Uses the TSclust package

  • "pacf": Partial autocorrelation-based dissimilarity. Uses the TSclust package

  • "ar.lpc.ceps": Dissimilarity based on LPC cepstral coefficients. Uses the TSclust package

  • "ar.mah": Model-based dissimilarity proposed by Maharaj (1996, 2000). Uses the TSclust package

  • "ar.pic": Model-based dissimilarity measure proposed by Piccolo (1990)Uses the TSclust package

  • "cdm": Compression-based dissimilarity measure . Uses the TSclust

  • "cid": Complexity-invariant distance measure. Uses the TSclust package (see

  • "cor": Dissimilarities based on Pearson's correlation . Uses the TSclust package

  • "cort": Dissimilarity index which combines temporal correlation and raw value behavior. Uses the TSclust package

  • "wav": Dissimilarity based on wavelet feature extraction . Uses the TSclust package

  • "int.per": Integrated periodogram based dissimilarity. Uses the TSclust package

  • "per": Periodogram based dissimilarity Uses the TSclust package

  • "mindist.sax": Symbolic Aggregate Aproximation based dissimilarity. Uses the TSclust package

  • "ncd": Normalized compression based distance . Uses the TSclust package

  • "pred": Dissimilarity measure cased on nonparametric forecasts Uses the TSclust package

  • "spec.glk": Dissimilarity based on the generalized likelihood ratio test Uses the TSclust package

  • "spec.isd": Dissimilarity based on the integrated squared difference between the log-spectr Uses the TSclust package

  • "spec.llr": General spectral dissimilarity measure using local-linear estimation of the log-spectr Uses the TSclust package

  • "pdc": Permutation Distribution Distance. Uses the pdc package.

  • "frechet": Frechet distance. Uses the longitudinalData package.

Value

DistanceMatrix[1:m,1:m]

Author(s)

Michael Thrun

References

[Moerchen, 2006] Moerchen, Fabian. Time series knowledge mining. Goerich & Weiershaeuser, 2006.


Mthrun/TSAT documentation built on Feb. 5, 2024, 11:15 p.m.