open-discussion > RE: number of clusters
Aug 17, 2015  07:08 AM | Daniel Lurie
RE: number of clusters
Hi all,

I'm also experiencing this issue (212 subjects, 4mm voxels, HO 25% GM mask, group average parcellation).

It looks like the actual parcel data (in the .npy files) contains the right number of parcels. You can check this on your own results with the following python code:
import numpy as np
parcel_data = np.load('/path/to/parcellation_k.npy')
np.unique(parcel_data, return_counts=True)

This will return two arrays of equal length. The first array shows every unique value in the data, so if your k=100, it should have *around* 100 entries (as Cameron mentions in the paper, NCUT can sometimes produce clustering with empty clusters, so your actual k might end up somewhat smaller than your desired k). The second array is the number of voxels with each value at the same array index in the first array.

I think the issue is with the scripts that convert the NumPy parcellation data into a NIfTI volume. Working on a fix now, will report back if/when I'm successful.


Threaded View

Shengwei Zhang Jan 27, 2015
Daniel Lurie Aug 17, 2015
RE: number of clusters
Daniel Lurie Aug 17, 2015
S Mody Aug 15, 2015
Adam Steel Aug 13, 2015
S Mody Aug 15, 2015
Shengwei Zhang Aug 13, 2015