Created
January 9, 2021 11:50
-
-
Save davidzhaodz/ef7be3a772bcdd5a4e63418d1c1a49ca 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
# creating dataframe of only bin labels | |
primary_forecast = pd.DataFrame(labels['bin']) | |
# setting predicted column to 1 | |
primary_forecast['pred'] = 1 | |
primary_forecast.columns = ['actual', 'pred'] | |
# Performance Metrics | |
actual = primary_forecast['actual'] | |
pred = primary_forecast['pred'] | |
print(classification_report(y_true=actual, y_pred=pred)) | |
print("Confusion Matrix") | |
print(confusion_matrix(actual, pred)) | |
print('') | |
print("Accuracy") | |
print(accuracy_score(actual, pred)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment