megicparc.functions
.compute_parcellation¶
- megicparc.functions.compute_parcellation(sort_dist, k_nn)¶
Run flame algorithm
Parameters¶
- sort_distdict
A dictionary containing: sort_dist[‘vals’] : ndarray, shape (n_sources, n_sources-1) Distance matrix, each row sorted in ascending order. sort_dist[‘idx’] : ndarray, shape (n_source, n_sources-1) Indices that would sort the distance matrix
- k_nnint in (0, +inf]
Number of nearest neighbours
Returns¶
- flame_datadict
Results of flame algorithm
Notes¶
flame_data contains: centroids : int
Number of regions
- centroids_idarray of int, shape (n_roi, )
Indices of the points that are centroids
- outliersint
Number of outliers
- outliers_idarray of int, shape (n_out, )
Indices of the points that are outliers
- weightsndarray of float, shape (n_vert, k_nn)
Weights used in the computation of fuzzy membership
- nncountsarray of int, shape (n_vert, )
Actual size of the sets of nearest neighbours
- parcellist of array
List of all the parcels. The last parcel contains the outliers (if any)