Updated Objectives API to allow for sample weighting - #2433
Merged
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.
|
christopherbunn
force-pushed
the
1867_objective_weighting
branch
2 times, most recently
from
June 25, 2021 03:36
ec5469e to
fc9e816
Compare
christopherbunn
marked this pull request as ready for review
June 25, 2021 13:53
christopherbunn
requested review from
angela97lin,
dsherry,
freddyaboulton and
jeremyliweishih
June 25, 2021 13:54
chukarsten
approved these changes
Jun 25, 2021
freddyaboulton
approved these changes
Jun 25, 2021
freddyaboulton
left a comment
Contributor
There was a problem hiding this comment.
@christopherbunn Looks good to me! Is there a plan to use this in automl? Just curious
| 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): |
Contributor
There was a problem hiding this comment.
Can you update the docstring here and in fraud and lead scoring?
christopherbunn
force-pushed
the
1867_objective_weighting
branch
from
June 25, 2021 16:33
fc9e816 to
eb10dbe
Compare
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added the
sample_weightparameter toobjective_functionandscorein ObjectiveBase. Also updated most scikit-learn based standard metrics to utilize sample weights where appropriate.Resolves #1867