dis_pca: Constructs a pairwise distance matrix based on Principal...

View source: R/dis_pca.R

dis_pcaR Documentation

Constructs a pairwise distance matrix based on Principal Component Analysis (PCA)

Description

dis_eros returns a pairwise distance matrix based on the PCA similarity factor proposed by \insertCitesinghal2005clustering;textualmlmts.

Usage

dis_pca(X, retained_components = 3)

Arguments

X

A list of MTS (numerical matrices).

retained_components

Number of retained principal components.

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_{PCA}(\boldsymbol X_{T}, \boldsymbol Y_{T})=1-S_{PCA} (\boldsymbol X_{T}, \boldsymbol Y_{T}), with

S_{PCA}(\boldsymbol X_{T}, \boldsymbol Y_{T})=\frac{\sum_{i=1}^{k}\sum_{j=1}^{k} (\lambda^i_{\boldsymbol X_T} \lambda^j_{\boldsymbol Y_T})\cos^2 \theta_{ij}}{\sum_{i=1}^{k} \lambda^i_{\boldsymbol X_T} \lambda^i_{\boldsymbol Y_T}},

where \theta_{ij} is the angle between the ith eigenvector of \boldsymbol X_{T} and the jth eigenvector of series \boldsymbol Y_{T}, respectively, and \lambda^i_{\boldsymbol Y_T} and \lambda^i_{\boldsymbol Y_T} are the ith eigenvalues of \boldsymbol X_{T} and the jth eigenvalues of series \boldsymbol Y_{T} respectively.

Value

The computed pairwise distance matrix.

Author(s)

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

References

\insertRef

singhal2005clusteringmlmts

Examples

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

mlmts documentation built on Sept. 11, 2024, 6:41 p.m.

Related to dis_pca in mlmts...