DissimDistance: The Dissim distance is calculated.

View source: R/dissim_distance.R

DissimDistanceR Documentation

The Dissim distance is calculated.

Description

Computes the Dissim distance between a pair of numeric series.

Usage

DissimDistance(x, y, tx, ty)

Arguments

x

Numeric vector containing the first time series.

y

Numeric vector containing the second time series.

tx

If not constant, a numeric vector that specifies the sampling index of series x.

ty

If not constant, a numeric vector that specifies the sampling index of series y.

Details

The Dissim distance is obtained by calculating the integral of the Euclidean distance between the two series. The series are assumed to be linear between sampling points.

The two series must start and end in the same interval but they may have different and non-constant sampling rates. These sampling rates must be positive and strictly increasing. For more information see reference below.

Value

d

The computed distance between the pair of series.

Author(s)

Usue Mori, Alexander Mendiburu, Jose A. Lozano.

References

Frentzos, E., Gratsias, K., & Theodoridis, Y. (2007). Index-based Most Similar Trajectory Search. In Proceeding of the IEEE 23rd International Conference on Data Engineering (pp. 816-825).

Esling, P., & Agon, C. (2012). Time-series data mining. ACM Computing Surveys (CSUR), 45(1), 1–34.

See Also

To calculate this distance measure using ts, zoo or xts objects see TSDistances. To calculate distance matrices of time series databases using this measure see TSDatabaseDistances.

Examples

#The objects example.series1 and example.series2 are two 
#numeric series of length 100 contained in the TSdist package. 

data(example.series1)
data(example.series2)

#For information on their generation and shape see help 
#page of example.series.

help(example.series)

#Calculate the Dissim distance assuming even sampling:

DissimDistance(example.series1, example.series2)

#Calculate the Dissim distance assuming uneven sampling:

tx<-unique(c(seq(2, 175, 2), seq(7, 175, 7)))
tx <- tx[order(tx)]
ty <- tx
DissimDistance(example.series1, example.series2, tx, ty)


TSdist documentation built on Aug. 31, 2022, 5:09 p.m.