dis_pca {mlmts} | R 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 Singhal and Seborg (2005).
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 i
th eigenvector of
\boldsymbol X_{T}
and the j
th eigenvector of series \boldsymbol Y_{T}
,
respectively, and \lambda^i_{\boldsymbol Y_T}
and \lambda^i_{\boldsymbol Y_T}
are the i
th eigenvalues of \boldsymbol X_{T}
and the
j
th eigenvalues of series \boldsymbol Y_{T}
respectively.
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.
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