The distance matrix of a time series database is calculated by providing the pair-wise distances between the series that conform it. x
can be saved in a numeric matrix, a list or a mts
, zoo
or xts
object. The following distance methods are supported:
"euclidean": Euclidean distance. EuclideanDistance
"manhattan": Manhattan distance. ManhattanDistance
"minkowski": Minkowski distance. MinkowskiDistance
"infnorm": Infinite norm distance. InfNormDistance
"ccor": Distance based on the cross-correlation. CCorDistance
"sts": Short time series distance. STSDistance
"dtw": Dynamic Time Warping distance. DTWDistance
. Uses the dtw package (see dtw
).
"lb.keogh": LB_Keogh lower bound for the Dynamic Time Warping distance. LBKeoghDistance
"edr": Edit distance for real sequences. EDRDistance
"erp": Edit distance with real penalty. ERPDistance
"lcss": Longest Common Subsequence Matching. LCSSDistance
"fourier": Distance based on the Fourier Discrete Transform. FourierDistance
"tquest": TQuest distance. TquestDistance
"dissim": Dissim distance. DissimDistance
"acf": Autocorrelation-based dissimilarity ACFDistance
. Uses the TSclust package (see diss.ACF
).
"pacf": Partial autocorrelation-based dissimilarity PACFDistance
. Uses the TSclust package (see diss.PACF
).
"ar.lpc.ceps": Dissimilarity based on LPC cepstral coefficients ARLPCCepsDistance
. Uses the TSclust package (see diss.AR.LPC.CEPS
).
"ar.mah": Model-based dissimilarity proposed by Maharaj (1996, 2000) ARMahDistance
. Uses the TSclust package (see diss.AR.MAH
).
"ar.pic": Model-based dissimilarity measure proposed by Piccolo (1990) ARPicDistance
. Uses the TSclust package (see diss.AR.PIC
).
"cdm": Compression-based dissimilarity measure CDMDistance
. Uses the TSclust package (see diss.CDM
).
"cid": Complexity-invariant distance measure CIDDistance
. Uses the TSclust package (see diss.CID
).
"cor": Dissimilarities based on Pearson's correlation CorDistance
. Uses the TSclust package (see diss.COR
).
"cort": Dissimilarity index which combines temporal correlation and raw value
behaviors CortDistance
. Uses the TSclust package (see diss.CORT
).
"int.per": Integrated periodogram based dissimilarity IntPerDistance
. Uses the TSclust package (see diss.INT.PER
).
"per": Periodogram based dissimilarity PerDistance
. Uses the TSclust package (see diss.PER
).
"mindist.sax": Symbolic Aggregate Aproximation based dissimilarity MindistSaxDistance
. Uses the TSclust package (see diss.MINDIST.SAX
).
"ncd": Normalized compression based distance NCDDistance
. Uses the TSclust package (see diss.NCD
).
"pred": Dissimilarity measure cased on nonparametric forecasts PredDistance
. Uses the TSclust package (see diss.PRED
).
"spec.glk": Dissimilarity based on the generalized likelihood ratio test SpecGLKDistance
. Uses the TSclust package (see diss.SPEC.GLK
).
"spec.isd": Dissimilarity based on the integrated squared difference between the log-spectra SpecISDDistance
. Uses the TSclust package (see diss.SPEC.ISD
).
"spec.llr": General spectral dissimilarity measure using local-linear estimation of the log-spectra SpecLLRDistance
. Uses the TSclust package (see diss.SPEC.LLR
).
"pdc": Permutation Distribution Distance PDCDistance
. Uses the pdc package (see pdcDist
).
"frechet": Frechet distance FrechetDistance
. Uses the longitudinalData package (see distFrechet
).
"tam": Time Aligment Measurement TAMDistance
.
Some distance measures may require additional arguments. See the individual help pages (detailed above) for more information about each method. These parameters should be named in order to avoid mismatches.