mc2pca_clustering: Performs the crisp clustering algorithm of Li (2019)

View source: R/mc2pca_clustering.R

mc2pca_clusteringR Documentation

Performs the crisp clustering algorithm of Li (2019)

Description

mc2pca_clustering performs the clustering algorithm proposed by \insertCiteli2019multivariate;textualmlmts, which is based on common principal component analysis (CPCA).

Usage

mc2pca_clustering(X, k, var_rate = 0.9, max_it = 1000, tol = 1e-05)

Arguments

X

A list of MTS (numerical matrices).

k

The number of clusters.

var_rate

Rate of retained variability concerning the reconstructed MTS samples (default is 0.90).

max_it

The maximum number of iterations (default is 1000).

tol

The tolerance (default is 1e-5).

Details

This function executes the crisp clustering method proposed by . The algorithm is a K-means-type procedure where the distance between a given MTS and a centroid is given by the reconstruction error taking place when the series is reconstructed from the common space obtained by considering all the series in the cluster associated with the corresponding centroid (the common space is the centroid).

Value

A list with two elements:

  • cluster. A vector defining the clustering solution.

  • iterations. The number of iterations before the algorithm stopped.

Author(s)

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

References

\insertRef

li2019multivariatemlmts

Examples

clustering_algorithm <- mc2pca_clustering(BasicMotions$data, k = 4, var_rate = 0.30)
# Executing the clustering algorithm in the dataset BasicMotions (var_rate = 0.30,
# i.e., we keep only a few principal components for computing the reconstructed series)
clustering_algorithm$cluster # The clustering solution
clustering_algorithm$iterations # The number of iterations before the algorithm
library(ClusterR)
external_validation(clustering_algorithm$cluster, BasicMotions$classes,
summary_stats = TRUE) # Evaluating the clustering algorithms vs the true partition
# stopped

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