dis_mahalanobis {mlmts}R Documentation

Constructs a pairwise distance matrix based on the Mahalanobis distance

Description

dis_mahalanobis returns a pairwise distance matrix based on the Mahalanobis divergence introduced by Singhal and Seborg (2005).

Usage

dis_mahalanobis(X)

Arguments

X

A list of MTS (numerical matrices).

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

d_{MD}^*(\boldsymbol X_T, \boldsymbol Y_T)=\frac{1}{2}\Big(d_{MD} (\boldsymbol X_T, \boldsymbol Y_T)+d_{MD}(\boldsymbol Y_T, \boldsymbol X_T)\Big),

with

d_{MD}(\boldsymbol X_T, \boldsymbol Y_T)=\sqrt{(\overline{\boldsymbol X}_T -\overline{\boldsymbol Y}_T)\boldsymbol \Sigma_{\boldsymbol X_T}^{*-1}(\overline {\boldsymbol X}_T-\overline{\boldsymbol Y}_T)^\top},

where \overline{\boldsymbol X}_T and \overline{\boldsymbol Y}_T are vectors containing the column-wise means concerning series \boldsymbol X_T and \boldsymbol Y_T, respectively, \boldsymbol \Sigma_{\boldsymbol X_T} is the covariance matrix of \boldsymbol X_T and \boldsymbol \Sigma_{\boldsymbol X_T}^{*-1} is the pseudo-inverse of \boldsymbol \Sigma_{\boldsymbol X_T} calculated using SVD. In the computation of d_{MD}^*, MTS \boldsymbol X_T is assumed to be the reference series.

Value

The computed pairwise distance matrix.

Author(s)

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

References

Singhal A, Seborg DE (2005). “Clustering multivariate time-series data.” Journal of Chemometrics: A Journal of the Chemometrics Society, 19(8), 427–438.

See Also

dis_mahalanobis_dtw

Examples

toy_dataset <- AtrialFibrillation$data[1 : 10] # Selecting the first 10 MTS from the
# dataset AtrialFibrillation
distance_matrix <- dis_mahalanobis(toy_dataset) # Computing the pairwise
# distance matrix based on the distance dis_mahalanobis.

[Package mlmts version 1.1.1 Index]