tf-idf feature weights using sklearn.feature_extraction.text.TfidfVectorizer
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: this page: http://scikit-learn.org/stable/modules/feature_extraction.html mentions: TfidfVectorizer that combines all the option of CountVectorizer and TfidfTransformer in a single model. then I followed the code and use fit_transform() on my corpus. How to get the weight of each feature computed by fit_transform()? I tried: In [39]: vectorizer.idf_ --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in () ----> 1 vectorizer.idf_ AttributeError: 'TfidfVectorizer' object