mc2pca_clustering {mlmts}R Documentation

Performs the crisp clustering algorithm of Li (2019)

Description

mc2pca_clustering performs the clustering algorithm proposed by Li (2019), 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:

Author(s)

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

References

Li H (2019). “Multivariate time series clustering based on common principal component analysis.” Neurocomputing, 349, 239–247.

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

[Package mlmts version 1.1.1 Index]