Dictionary support for Undersampler - #2271
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.
|
chukarsten
left a comment
There was a problem hiding this comment.
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.
freddyaboulton
left a comment
There was a problem hiding this comment.
@bchen1116 This looks good to me!
| y = infer_feature_types(y) | ||
| return X, None | ||
|
|
||
| def _convert_dictionary(self, sampling_dict, y): |
There was a problem hiding this comment.
Should this method live in the base class? It would be different for undersamplers vs oversampler right?
There was a problem hiding this comment.
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