Created
May 15, 2021 12:15
-
-
Save seanbenhur/e652a8f7244a73ddf4aa3afd708273e8 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
model = make_pipeline_imb(TfidfVectorizer(), RandomUnderSampler(), MultinomialNB()) | |
model.fit(X_train, y_train) | |
y_pred = model.predict(X_test) | |
print(classification_report(y_test,y_pred)) | |
# precision recall f1-score support | |
# | |
# 0 0.73 0.87 0.79 319 | |
# 1 0.97 0.86 0.91 389 | |
# 2 0.95 0.90 0.93 394 | |
# 3 0.76 0.76 0.76 251 | |
# accuracy 0.86 1353 | |
# macro avg 0.85 0.85 0.85 1353 | |
#weighted avg 0.87 0.86 0.86 1353 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment