Created
November 2, 2015 12:13
-
-
Save kiote/68f0721626b66c8bd4a6 to your computer and use it in GitHub Desktop.
mdl_estimation
This file contains hidden or 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
# quality of classification | |
from sklearn.metrics import accuracy_score | |
y_true = test['numeric_status'] | |
y_pred = result | |
print "Predicted accuracy: %f" % accuracy_score(y_true, y_pred) | |
# let's also calculate "baseline accuracy" - when we just say "yes" every time (most common outcome) | |
baseline = [1] * len(y_pred) | |
print "Baseline accuracy: %f" % accuracy_score(y_true, baseline) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment