Skip to content

Upsampling ratio doesn't seem to behave as the documentation suggests it would for custom model training with multiple small classes #877

@wcornwell

Description

@wcornwell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions