Created
June 19, 2018 02:38
-
-
Save ken333135/d85c752c4b8ba3f7eac16630f6d1aadd to your computer and use it in GitHub Desktop.
Get Top words for each class (multi-class text classification)
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
top_words = [] | |
#loop to find top 5 words of each class in the dataset | |
for code in vect_data.index: | |
top_words.append([code,find_top_words(code,5)]) | |
#print the list of top words | |
top_words |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment