Cluster#

This module contains the clustering algorithms supported by pycrostates. Each clustering algorithm is defined as a class with specific initialization parameters, a fit method and a predict method.

The fitting method fit requires a dataset as a Raw, Epochs or ChData object. Fitting will train the clustering algorithm and determine the microstates maps associated with this dataset.

The fitted clustering algorithm can then be used to determine the segmentation of the same or of another dataset (recorded using the same system, with the same channels) using the predict method. This method will return either a RawSegmentation or a EpochsSegmentation depending on the dataset to segment.

ModKMeans(n_clusters[, n_init, max_iter, ...])

Modified K-Means clustering algorithm.

AAHCluster(n_clusters[, normalize_input])

Atomize and Agglomerate Hierarchical Clustering (AAHC) algorithm.

Utils#

This module contains the clustering utils functions of pycrostates.

optimize_order(inst, template_inst)

Optimize the order of cluster centers between two cluster instances.