Created
October 1, 2020 13:44
-
-
Save Kamaldeep0077/1e874be76b1afa48112641fee84c54d5 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
#Training the model using mode of target | |
from sklearn.metrics import f1_score, accuracy_score, confusion_matrix | |
pred_test = [] | |
for i in range (0, 13020): | |
pred_test.append(y_train.mode()[0]) | |
#Printing f1 and accuracy scores | |
print('The accuracy for mode model is:', accuracy_score(y_test, pred_test)) | |
print('The f1 score for the model model is:',f1_score(y_test, pred_test)) | |
#Ploting the cunfusion matrix | |
conf_matrix(y_test, pred_test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment