2013/2/1 Robert Layton <[email protected]>:
> They are ordered, so you can get the cluster number of the ith document
> using:
>
> model.labels_[i]
... and all indices of documents in the cluster k with
np.where(models.labels_ == k)
> And the corresponding document is simply:
>
> documents[i]
... where documents is the original list of documents. You as the
caller are responsible for keeping the original document somewhere and
remember the order in which you fed them to k-means.
--
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general