Created
February 3, 2019 21:20
-
-
Save terrah27/6a4809815cd46091c716692337aa64c8 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 undersampled dataset | |
y_train = downsampled.Class | |
X_train = downsampled.drop('Class', axis=1) | |
undersampled = LogisticRegression(solver='liblinear').fit(X_train, y_train) | |
undersampled_pred = undersampled.predict(X_test) | |
# Checking accuracy | |
accuracy_score(y_test, undersampled_pred) | |
0.9758 | |
# f1 score | |
f1_score(y_test, undersampled_pred) | |
0.1171 | |
recall_score(y_test, undersampled_pred) | |
0.8636 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment