Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

nilearn.regions.recursive_neighbor_agglomeration#

nilearn.regions.recursive_neighbor_agglomeration(X, mask_img, n_clusters, n_iter=10, threshold=1e-07, verbose=0)[source]#

Recursive neighbor agglomeration (ReNA): it performs iteratively the nearest neighbor grouping. See 1.

Parameters
Xnumpy.ndarray

Training data. shape = [n_samples, n_features]

mask_imgNiimg-like object

Object used for masking the data.

n_clustersint

The number of clusters to find.

n_iterint, optional

Number of iterations. Default=10.

thresholdfloat in the close interval [0, 1], optional

The threshold is set to handle eccentricities. Default=1e-7.

verboseint, optional

Verbosity level. Default=0.

Returns
n_componentsint

Number of clusters.

labelsnumpy.ndarray

Cluster assignation. shape = [n_features]

References

1

Andres Hoyos-Idrobo, Gael Varoquaux, Jonas Kahn, and Bertrand Thirion. Recursive nearest agglomeration (rena): fast clustering for approximation of structured signals. IEEE Trans. Pattern Anal. Mach. Intell., 41(3):669–681, 3 2019. URL: https://doi.org/10.1109/TPAMI.2018.2815524, doi:10.1109/TPAMI.2018.2815524.