Describe the bug
Upsampling ratio doesn't seem to behave as the documentation suggests it would. For examples with large number of classes, the number of upsamples doesn't go up as fast as the clip distribution + upsampling ratio would suggest.
I think after upsampling the first small class, the counter (y_temp) inflates globally, causing subsequent classes to skip upsampling even if they're underrepresented.
I think the issue is here:
|
while y[:, i].sum() + len(y_temp) < min_samples: |
This doesn't really have any effect for binary custom classifiers, but for a multi-class, custom model with multiple small classes, then this can make it hard to upsample them properly.