Learn R Programming

DTWBI (version 1.1)

dist_afbdtw: Adaptive Feature Based Dynamic Time Warping algorithm

Description

This function estimates a distance matrix which is used as an input in dtw() function (package dtw) to align two univariate signals following Adaptative Feature Based Dynamic Time Warping algorithm (AFBDTW).

Usage

dist_afbdtw(q, r, w1 = 0.5)

Arguments

q

query vector

r

reference vector

w1

weight of local feature VS global feature. By default, w1 = 0.5, and by definition, w2 = 1 - w1.

Value

A list containing the following elements:

  • query: the query vector

  • response: the response vector

  • query_local: local feature of the query

  • response_local: local feature of the response vector

  • query_global: global feature of the query

  • response_global: global feature of the response vector

  • dist_local: distance matrix of the local feature

  • dist_local: distance matrix of the global feature

  • distAFBDTW: AFBDTW distance matrix

Examples

Run this code
# NOT RUN {
data(dataDTWBI)
X <- dataDTWBI[, 1] ; Y <- dataDTWBI[, 2]
AFBDTW_Dist <- dist_afbdtw(X, Y)
# }

Run the code above in your browser using DataLab