Created
October 18, 2017 20:11
-
-
Save Damian89/2cfc88f1bc2bac2e4f15c2b544c92274 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print() | |
print("TF-IDF + FastICA") | |
tfidf_vect = feature_extraction.text.TfidfVectorizer(stop_words=stoplist) | |
tfidf_vect.fit(docs) | |
features = tfidf_vect.get_feature_names() | |
tfidf = tfidf_vect.transform(docs) | |
tfidf_lsi = decomposition.FastICA(n_components=2) | |
tfidf_lsi.fit(tfidf.toarray()) | |
print_topic_cloud(tfidf_lsi.components_,features, max_words) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment