-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add binary classification accuracy objective #624
Conversation
Codecov Report
@@ Coverage Diff @@
## master #624 +/- ##
=======================================
Coverage 98.95% 98.96%
=======================================
Files 132 133 +1
Lines 4504 4534 +30
=======================================
+ Hits 4457 4487 +30
Misses 47 47
Continue to review full report at Codecov.
|
raise ValueError("Length of inputs is 0") | ||
if len(y_predicted) != len(y_true): | ||
raise DimensionMismatchError("Inputs have mismatched dimensions: y_predicted has shape {}, y_true has shape {}".format(len(y_predicted), len(y_true))) | ||
return metrics.accuracy_score(y_true, y_predicted) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this is great. I wonder if there's a good way we can have this sort of validation occur in all objectives. But not necessary for this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I filed #619 for that :D We can refactor any test code that happens then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple comments but otherwise looks great!
Closes #294
Continuation of #584, but using master as the new base (switching in #584 caused a lot of weird merge issues?)