2012/5/10 JAGANADH G <[email protected]>:
> Hi all
>
> Is there any way to get the TF-IDF value mapped with the word vector in
> sklearn.
>
> I would like to get output like
>
> w1 -> TF-IDF
> w2 -> TF-IDF

TF is sample-dependent but the IDF weights for each feature index are
stored as an array attribute named `idf_` on the fitted vectorizer
along with the `vocabulary_` that gives you the mapping from words to
IDF weights.

See the documentation for more details:

http://scikit-learn.org/dev/modules/feature_extraction.html#text-feature-extraction

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to