R: Time Alignment Measurement (TAM) distance.

TAMDistance {TSdist} | R Documentation

## Time Alignment Measurement (TAM) distance.

### Description

Computes the Time Alignment Measurement between a pair of numeric time series.

### Usage

    TAMDistance(x, y)

### Arguments

`x` | Numeric vector containing the first time series.
`y` | Numeric vector containing the second time series.

### Details

The Time Alignment Measurement (TAM) between two numeric series is calculated. Quantifies the degree of temporal distortion between two time series.

The main idea behind TAM is to measure the warping cost between a given time series and another. TAM is calculated from the optimal alignment warping path between two time series provided by `dtw`, which allows characterizing the intervals when the series are in phase, advance or delay. This distance penalizes signals where advance or delay is present and benefits series that are in phase with each other. As the distance increases, the dissimilarity between both signals also increases. The distance is bounded between 0 (both series are in phase) and 3 (both series are completely out-of-phase).

The length of series `x` and `y` may be different.

### Value

`d` | The computed distance between the pair of series.

### Author(s)

Duarte Folgado

### References

Duarte Folgado, Marília Barandas, Ricardo Matias, Rodrigo Martins, Miguel Carvalho, Hugo Gamboa (2018). Time Alignment Measurement for Time Series. Pattern Recognition 81, pp. 268-279.

### 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)

    # The objects example.series3 and example.series4 are two
    # numeric series of length 100 and 120 contained in the TSdist
    # package.

    data(example.series3)
    data(example.series4)

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

    help(example.series)

    # Calculate the TAM distance for two series of the same length:

    TAMDistance(example.series1, example.series2)

    # Calculate the TAM distance for two series of different length:

    TAMDistance(example.series3, example.series4)

[Package TSdist version 3.6 Index]