I am trying to solve a multi-class imbalance classification problem. For that, I am using SMOTE for oversampling and OSS for under-sampling. But I have a doubt as I am working on multi-class so I have to convert it into binary classification. So we can convert it using OVA/OAA. So how can I use OVA/OAA with both under-sampling and oversampling on the same data-set?
-
$\begingroup$ Thank you so much for your response. Firstly I will use OVA for converting multiclass into binary like if I have 3 classes then I will make 1 class as positive and other two classes as negative so it will make 3 combinations then I will I apply Resampling on both negative and positive for all the three combination individually. After that I will train my classifier with resampled classes(positive+negative) of all the three combinations individually and then will combine the result of all the combinations. Is it the right way to do? $\endgroup$– Ayushi ChaplotCommented Jan 29, 2019 at 2:07
2 Answers
I am not sure why you need to convert your classification task to binary sub-tasks. Using the SMOTE/SMOTEENN libraries in Python, you can oversample/undersample all of the classes in one line of code. Also, if you have categorical features in your feature set, you may need to take a look at SMOTE-NC approach too, as SMOTE and SMOTEENN are purely distance-based and underestimate the role and value of Categorical features.
If you convert your problem to a binary classification task, you do not need to worry about any conflict with re-sampling techniques. You can then just use the imblearn.combine
which combines Oversampling and under-sampling in one algorithm. There are classes available for this but I have found SMOTEENN
to produce better results. SMOTEENN