Guest User

Untitled

a guest
Oct 19th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. print()
  2. print("TF-IDF + IncrementalPCA")
  3.  
  4. tfidf_vect = feature_extraction.text.TfidfVectorizer(stop_words=stoplist)
  5. tfidf_vect.fit(docs)
  6. features = tfidf_vect.get_feature_names()
  7.  
  8. tfidf = tfidf_vect.transform(docs)
  9. tfidf_lsi = decomposition.IncrementalPCA(n_components=2)
  10. tfidf_lsi.fit(tfidf.toarray())
  11.  
  12. print_topic_cloud(tfidf_lsi.components_,features, max_words)
Add Comment
Please, Sign In to add comment