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