-
Notifications
You must be signed in to change notification settings - Fork 86
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
Updated Objectives API to allow for sample weighting #2433
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2433 +/- ##
=======================================
+ Coverage 99.7% 99.7% +0.1%
=======================================
Files 283 283
Lines 25478 25500 +22
=======================================
+ Hits 25378 25400 +22
Misses 100 100
Continue to review full report at Codecov.
|
ec5469e
to
fc9e816
Compare
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!
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.
@christopherbunn Looks good to me! Is there a plan to use this in automl? Just curious
@@ -35,7 +35,7 @@ def __init__(self, true_positive, true_negative, false_positive, false_negative) | |||
self.false_positive = false_positive | |||
self.false_negative = false_negative | |||
|
|||
def objective_function(self, y_true, y_predicted, X=None): | |||
def objective_function(self, y_true, y_predicted, X=None, sample_weight=None): |
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.
Can you update the docstring here and in fraud and lead scoring?
fc9e816
to
eb10dbe
Compare
Added the
sample_weight
parameter toobjective_function
andscore
in ObjectiveBase. Also updated most scikit-learn based standard metrics to utilize sample weights where appropriate.Resolves #1867