Learn R Programming

mlmts (version 1.1.2)

dis_mahalanobis_dtw: Constructs a pairwise distance matrix based on a dissimilarity combining both the dynamic time warping and the Mahalanobis distance.

Description

dis_mahalanobis_dtw returns a pairwise distance matrix based on a dynamic time warping distance in which the local cost matrix is computed by using the Mahalanobis distance mei2015learningmlmts.

Usage

dis_mahalanobis_dtw(X, M = NULL, ...)

Value

The computed pairwise distance matrix.

Arguments

X

A list of MTS (numerical matrices).

M

The matrix with respect to compute the Mahalanobis distance (default is the covariance matrix of concatenation of all MTS objects by rows).

...

Additional parameters for the function. See dtw.

Author

Ángel López-Oriona, José A. Vilar

Details

Given a collection of MTS, the function returns the pairwise distance matrix, where the distance between two MTS \(\boldsymbol X_T\) and \(\boldsymbol Y_T\) is defined as a dynamic time warping-type distance in which the local cost matrix is constructed by using the Mahalanobis distance.

References

mei2015learningmlmts

See Also

dis_dtw_1, dis_dtw_2, dis_mahalanobis_dtw

Examples

Run this code
toy_dataset <- Libras$data[1 : 10] # Selecting the first 10 MTS from the
# dataset Libras
distance_matrix <- dis_mahalanobis_dtw(toy_dataset) # Computing the pairwise
# distance matrix based on the distance dis_mahalanobis_dtw

Run the code above in your browser using DataLab