Hi,
How do I interpret the results of the TfidfVectorizer? For example:
from sklearn.feature_extraction.text import TfidfVectorizer
data = ['see spot run', 'run spot run']
vectorizer = TfidfVectorizer()
X = vectorizer.fit_transform(data)
print(X)
produces:
(0, 0) 0.501548907094
(0, 2) 0.501548907094
(0, 1) 0.704909488931
(1, 0) 0.894427191
(1, 2) 0.4472135955
I understand from the docs that this is a sparse matrix. However, I'm
unsure how to interpret it. For example, if I wanted the tfidf score of
each word in `data`, could I get that from the sparse matrix?
Thanks,
Adam
--
*Adam Goodkind *
adamgoodkind.com <http://www.adamgoodkind.com>
@adamgreatkind <https://twitter.com/#!/adamgreatkind>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general