Last active
September 23, 2020 07:05
-
-
Save abhishek-shrm/4d53b1f9f90b8959779e6810db7148a3 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
# Making final predictions | |
final_pred=model.predict(test_seq) | |
# Creating dataframe for final probabilties | |
prob=pd.DataFrame(columns=['id','toxic','severe_toxic','obscene','threat','insult','identity_hate']) | |
prob['id']=df_test['id'] | |
# Populating dataframe with probabilities | |
for index,value in enumerate(['toxic','severe_toxic','obscene','threat','insult','identity_hate']): | |
prob[value]=final_pred[:,index] | |
# Saving predictions as CSV | |
prob.to_csv('submission-CNN-final.csv',index=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment