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 Hoyos-Idrobo et al.[1].
- Parameters:
- X
numpy.ndarray
Training data. shape = [n_samples, n_features]
- mask_imgNiimg-like object
Object used for masking the data.
- n_clusters
int
The number of clusters to find.
- n_iter
int
, default=10 Number of iterations.
- threshold
float
in the close interval [0, 1], default=1e-7 The threshold is set to handle eccentricities.
- verbose
int
, default=0 Verbosity level.
- X
- Returns:
- n_components
int
Number of clusters.
- labels
numpy.ndarray
Cluster assignation. shape = [n_features]
- n_components
References