How areTF-IDF calculated by the scikit-learn TfidfVectorizer
问题 I run the following code to convert the text matrix to TF-IDF matrix. text = ['This is a string','This is another string','TFIDF computation calculation','TfIDF is the product of TF and IDF'] from sklearn.feature_extraction.text import TfidfVectorizer vectorizer = TfidfVectorizer(max_df=1.0, min_df=1, stop_words='english',norm = None) X = vectorizer.fit_transform(text) X_vovab = vectorizer.get_feature_names() X_mat = X.todense() X_idf = vectorizer.idf_ I get the following output X_vovab = [u