-
Notifications
You must be signed in to change notification settings - Fork 91
Refactor and remove SamplerBase class
#2775
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 #2775 +/- ##
=======================================
- Coverage 99.8% 99.8% -0.0%
=======================================
Files 301 298 -3
Lines 27904 27595 -309
=======================================
- Hits 27841 27527 -314
- Misses 63 68 +5
Continue to review full report at Codecov.
|
chukarsten
left a comment
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.
Just a few hypernits and an ask for an unnecessary comment cleanup! But awesome, this looks good.
| random_seed=0, | ||
| **kwargs, | ||
| ): | ||
| if sampling_ratio <= 0 or sampling_ratio > 1: |
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.
Is it worth getting ahead of the game and adding "raises" for these newish exceptions to the docstring?
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.
Love it! Unfortunately, the linting packages aren't smart enough to tell that the class docstring should be connected to the init docstring but going to add this 😁
Closes #2607
Removes
SamplerBaseclass, in favor ofBaseSampler.BalancedClassificationSamplerwas a subclass ofSamplerBaseand only used as a component object of the Undersampler class, so simplified by removing theBalancedClassificationSamplerclass and moving the implementation toUndersampler.