Created
June 19, 2018 02:18
-
-
Save ken333135/c77bd305c673b1528ddf8ac53bf3d2d2 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
#Gets the Tfidf Score of each document in the corpus, and formats it into a Pandas Dataframe | |
vect_data = pd.DataFrame(list(vect_uncommon.transform(uncommon_df['Fault Desc_Rect']).toarray())) | |
#Appends a new column containing the label of your data to the DataFrame | |
vect_data['Fault Code'] = list(data_df['Your_Label']) | |
vect_data.shape | |
vect_data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment