gradec.segmentation.KMeansSegmentation

class gradec.segmentation.KMeansSegmentation(n_segments=5)[source]

KMeans-based segmentation.

This method relies on 1D k-means clustering, which has previously been used to define clusters of functional connectivity matrices to establish a brain-wide parcellation.

fit(gradients)[source]

Fit Segmentation to gradients.

Parameters:

gradients ((V x D) numpy.ndarray) – Gradients vector, where V is the number of vertices and D is the number of dimensions.

Variables:
  • segments (list of numpy.ndarray) – List with thresholded gradients maps.

  • labels

  • boundaries

  • peaks

transform()

Transform gradients to maps.