Skip to content
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

How to vary the "proportion" parameter - MulticlassOversampling class #42

Open
jnatmed opened this issue Mar 21, 2022 · 2 comments
Open

Comments

@jnatmed
Copy link

jnatmed commented Mar 21, 2022

Hello, I am trying to vary the proportion parameter in the MulticlassOversampling class:

I tried passing passing through the declaration of an instance of the class, but when executing it it had no effect.

image

I also tried in the declaration of the distance_SMOTE(proportion=0.5) method.

image
This is so, because the MulticlassOversampling class creates examples until it matches the majority class. However, I want to try different variants and not only create up to 100%, but 75 or 50%.
I hope I made myself understood.

@1ZhangMR
Copy link

1ZhangMR commented Nov 1, 2024

Hello, have you solved it, I'm also modifying the portion parameter and it's not working!

@gykovacs
Copy link
Member

gykovacs commented Nov 5, 2024

Hi! Apologies for the late response. In the multi-class case, the proportion parameter is automatically determined for each class to match the majority class, so whatever you pass as proportion, will be overwritten. The reason for this is that in a multiclass case, the "proportion" is undefined: proportion of which class to which? Setting a proportion to 0.5 (in relation to the majority class) could lead to strange results, varying numbers of samples generated for each minority class, keeping the imbalance. Setting class level proportion parameters seems to me as a guarantee to overfitting, that is why it is not supported. I am 100% open to a discussion on the topic, and happy to add more controls to users, if it really makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants