-
Notifications
You must be signed in to change notification settings - Fork 89
Dictionary support for Undersampler #2271
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2271 +/- ##
=========================================
+ Coverage 100.0% 100.0% +0.1%
=========================================
Files 280 280
Lines 24336 24392 +56
=========================================
+ Hits 24314 24370 +56
Misses 22 22
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.
This is good work, Bryan. I think I need some chat with what this means to have a ratio for both the majority and minority class. That's a little confusing to me now that I'm looking at it. I think we also need to drop an update to the docstring and figure out what _dictionary_to_params() should be doing without 'sampling_ratio_dict' defined in the params.
evalml/pipelines/components/transformers/samplers/base_sampler.py
Outdated
Show resolved
Hide resolved
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.
Solid work! Ship it!
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.
@bchen1116 This looks good to me!
@@ -59,6 +59,52 @@ def transform(self, X, y=None): | |||
y = infer_feature_types(y) | |||
return X, None | |||
|
|||
def _convert_dictionary(self, sampling_dict, y): |
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 method live in the base class? It would be different for undersamplers vs oversampler right?
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.
I plan on doing an if-statement in the base class to handle the differences between over and undersamplers! Should be a one-line difference
fix #2105