DTWcort: Extention of the dynamic time warping distance

View source: R/Pattern_recognition_distances.R

DTWcortR Documentation

Extention of the dynamic time warping distance

Description

This function uses the dtw() function from the dtw R package to compute a distance based on the mapping than minimizes the distance between two sets of points, the parameters chosen are the "Manhattan" distance to compute the differences between points and the "sakoechiba" window type. Important note: the dtw function does not accept NA values, therefore these types of values are removed.

Usage

DTWcort(k, S1, S2, maxwindow)

Arguments

k

The parameter $k$ controls the contribution of the sum of squares comparison as a value-based metric and the $Cort$ quantity as a behavioral metric; when $k=0$, then the distance is equal to the value-based metric, on the other hand, when $k=6$ the distance is mainly determined by the value of the temporal correlation $Cort$.

S1

A vector representing a univariate time series

S2

A second vector representing a univariate time series

maxwindow

the maximum shift allowed between time series points.

Value

A non-negative value representing the distance between two time series

See Also

Douzal-Chouakria, Ahlame, and Cecile Amblard. "Classification Trees for Time Series." Pattern Recognition 45, no. 3 (March 2012): 1076-91. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.patcog.2011.08.018")}

Examples

S1=rnorm(100)
S2=rnorm(100)
k=1
maxwindow=20
DTWcort(k,S1, S2,maxwindow)


AnomalyScore documentation built on April 4, 2025, 3:13 a.m.