# Dissimilarity Index Combining Temporal Correlation and Raw Values Behaviors

### Description

Computes an adaptive dissimilarity index between two time series that covers both dissimilarity on raw values and dissimilarity on temporal correlation behaviors.

### Usage

1 | ```
diss.CORT(x, y, k = 2, deltamethod="Euclid")
``` |

### Arguments

`x` |
Numeric vector containing the first of the two time series. |

`y` |
Numeric vector containing the second of the two time series. |

`k` |
Parameter controlling the weight of the dissimilarity between dynamic behaviors (See Details). |

`deltamethod` |
Defines the method for the raw data discrepancy. Either |

### Details

The dissimilarity between time series `x`

and `y`

is given by:

* d(x,y) = Φ[CORT(x,y)] δ(x,y) *

where:

CORT(x,y) measures the proximity between the dynamic behaviors of x and y by means of the first order temporal correlation coefficient defined by:

* CORT(x,y) = ∑ ( ( x_(t+1) - x_t ) ( y_(t+1) - y_t ) ) / (√( ∑ (x_(t+1) - x_t)^2) √( ∑ (y_(t+1) - y_t)^2))*

*Φ[u]* is an adaptive tuning function taking the form:

*2/(1+exp(ku))*

with *k ≥q 0* so that both *Φ* and `k`

modulate the weight that CORT(x,y) has on d(x,y).

*δ(x,y)* denotes a dissimilarity measure between the raw values of series `x`

and `y`

, such as the Euclidean distance, the Frechet distance or the Dynamic Time Warping distance. Note that * d(x,y) = δ(x,y)* if `k=0`

.

More details of the procedure can be seen in Chouakria-Douzal and Nagabhushan (2007).

`deltamethod`

(*δ*) can be either Euclidean (`deltamethod = "Euclid"`

), Frechet (` deltamethod = "Frechet"`

) or Dynamic Time Warping (`deltamethod ="DTW"`

) distances. When calling from `dis.CORT`

, DTW uses Manhattan as local distance.

### Value

The computed distance.

### Author(s)

Pablo Montero Manso, José Antonio Vilar.

### References

Chouakria-Douzal, A. and Nagabhushan P. N. (2007) Adaptive dissimilarity index for measuring time series proximity. *Adv. Data Anal. Classif.*, **1(1)**, 5–21.

Montero, P and Vilar, J.A. (2014) *TSclust: An R Package for Time Series Clustering.* Journal of Statistical Software, 62(1), 1-43. http://www.jstatsoft.org/v62/i01/.

### See Also

`diss.COR`

, `diss.DTWARP`

, `diss.FRECHET`

, `distFrechet`

, `dtw`

.

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
## Create three sample time series
x <- cumsum(rnorm(100))
y <- cumsum(rnorm(100))
z <- sin(seq(0, pi, length.out=100))
## Compute the distance and check for coherent results
diss.CORT(x, y, 2)
diss.CORT(x, z, 2)
diss.CORT(y, z, 2)
#create a dist object for its use with clustering functions like pam or hclust
## Not run:
diss( rbind(x,y,z), "CORT", k=3, deltamethod="DTW")
## End(Not run)
``` |