2013/2/1 Fred Mailhot <[email protected]>:
> Given a fitted KMeans named "km", and a numpy array of documents, to get a
> list of documents associated with cluster i:
>
> documents[np.where(km.labels_ == i)]

That's assuming the documents are stored in a Numpy array. Python
lists don't permit such fancy indexing.

-- 
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

Reply via email to