[scikit-learn] Construct the microclusters using a CF-Tree

Roman Yurchak rth.yurchak at gmail.com
Thu Jul 6 15:59:48 EDT 2017


Hello Sema,

On 05/07/17 13:27, Sema Atasever wrote:
> How can i know which cluster member represents best each cluster?

You could try to pick the one that's closest to the cluster centroid..

> In the birch code i use this code line: *centroids =
> brc.subcluster_centers_*
> How do I interpret this line of code output?

It is supposed to give your the centroid of each leaf node (computed in 
https://github.com/scikit-learn/scikit-learn/blob/ab93d65/sklearn/cluster/birch.py#L472). 


I would just recompute the centroid from the labels, though, with
   X[brc.labels_==k, :].mean() for k in np.unique(brc.labels_)
to be sure of the results...

-- 
Roman



More information about the scikit-learn mailing list