mvpa2.algorithms.group_clusterthr.get_cluster_sizes

mvpa2.algorithms.group_clusterthr.get_cluster_sizes(ds, cluster_counter=None)

Compute cluster sizes from all samples in a boolean dataset.

Individually for each sample, in the input dataset, clusters of non-zero values will be determined after reverse-applying any transformation of the dataset’s mapper (if any).

Parameters:

ds : dataset or array

A dataset with boolean samples.

cluster_counter : list or None

If not None, given list is extended with the cluster sizes computed from the present input dataset. Otherwise, a new list is generated.

Returns:

list

Unsorted list of cluster sizes from all samples in the input dataset (optionally appended to any values passed via cluster_counter).