-
Notifications
You must be signed in to change notification settings - Fork 87
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
Fix ROC/confusion matrix if user passes own objectives #276
Conversation
Codecov Report
@@ Coverage Diff @@
## master #276 +/- ##
==========================================
+ Coverage 96.99% 97.01% +0.01%
==========================================
Files 95 95
Lines 2932 2950 +18
==========================================
+ Hits 2844 2862 +18
Misses 88 88
Continue to review full report at Codecov.
|
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.
implementation looks fine, just missing test case
evalml/models/auto_base.py
Outdated
@@ -52,6 +57,18 @@ def __init__(self, problem_type, tuner, cv, objective, max_pipelines, max_time, | |||
if existing_main_objective is not None: | |||
additional_objectives.remove(existing_main_objective) | |||
|
|||
# hacky, disallows non-numeric metrics from being primary objective | |||
if isinstance(self.objective, ConfusionMatrix) or isinstance(self.objective, ROC): |
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.
should this be in auto classifier? i dont think these metrics are valid for regression problems
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.
LGTM
Closes #246.
Somewhat hacky / hard-coded though, could be worthwhile to do the refactor necessary for metrics that don't return single numerical values.