PIA-Group/BioSPPy

How to use biosppy.clustering

alexxony opened this issue · 1 comments

I saw API reference, but I can not apply clustering on my data(1 dimension).
Can you upload examples for understanding clustering?

Hi, you can test the k-means algorithm, for example.
You could use the following code:

kmeans(np.array(data).reshape(-1,1), 3)

And the output will be:
"Dictionary with the sample indices (rows from 'data') for each found cluster; outliers have key -1; clusters are assigned integer keys starting at 0."