Created
February 3, 2019 21:16
-
-
Save terrah27/4764e8a0b8d136e9b25198d2097a71de 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
# trying logistic regression again with the balanced dataset | |
y_train = upsampled.Class | |
X_train = upsampled.drop('Class', axis=1) | |
upsampled = LogisticRegression(solver='liblinear').fit(X_train, y_train) | |
upsampled_pred = upsampled.predict(X_test) | |
# Checking accuracy | |
accuracy_score(y_test, upsampled_pred) | |
0.9807 | |
# f1 score | |
f1_score(y_test, upsampled_pred) | |
0.1437 | |
recall_score(y_test, upsampled_pred) | |
0.8712 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment