On 1 February 2013 10:20, Vinay B, <[email protected]> wrote:
> Another newbie question.
>
> I'm not referring to a confusion matrix or similar summary. Rather, If
> I had a number of documents clustered using (say KMeans) into 3
> clusters, .. how could I access
> 1. each cluster and a list of cluster terms?
> 2. a list of documents associated with each cluster?
>
>
> Thanks
>
>
> ------------------------------------------------------------------------------
> 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
>
The `labels_` attribute of a trained clustering model gives the cluster
numbers for each document.
They are ordered, so you can get the cluster number of the ith document
using:
model.labels_[i]
And the corresponding document is simply:
documents[i]
--
Public key at: http://pgp.mit.edu/ Search for this email address and select
the key from "2011-08-19" (key id: 54BA8735)
------------------------------------------------------------------------------
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