imbalanced-learn icon indicating copy to clipboard operation
imbalanced-learn copied to clipboard

[ENH] Extend Random Samplers float to support multiclass

Open dreamflasher opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe

I'd like to use a sample fraction (float strategy) with RandomOverSampler and RandomUnderSampler.

Describe the solution you'd like

Both RandomOverSampler and RandomUnderSampler should handle fractions/float strategy also in the case of multiple classes. Expected behaviour: When float, it corresponds to the desired ratio of the number of samples for each minority class over the number of samples in the majority class after resampling.

Describe alternatives you've considered

Calculating myself with the dict strategy, but it would be nice to have it part of the library.

If there's interest in this I could have a look if I can create a PR.

dreamflasher avatar Jun 24 '21 17:06 dreamflasher