MATLAB Answers

Using ADASYN with three classes

11 views (last 30 days)
Uerm on 12 Feb 2020
Answered: Raunak Gupta on 17 Feb 2020
I have a feature matrix where the first 456 columns are features and the last column is a label column. Because the dataset is highly imbalanced, I want to do oversampling of the minority classes using ADASYN. My feature matrix contains three classes: 0, 1 and 2 where 1 and 2 are the minority classes. I want to oversample them such that they have approximately the same "length" as the majority class.
I know that there is an ADASYN function in the File Exchanger and I have used it previously for two class problems as the function can only process two classes at a time.
Is there any way that I can use the function with three classes?

Answers (1)

Raunak Gupta
Raunak Gupta on 17 Feb 2020
From the example above I understand that Multiple classes are not supported for Oversampling techniques. Hence, I would suggest adding error weights to each class or use ensemble classifier from Statistics and Machine Learning Toolbox. Error weight can be equal to reciprocal of the number of samples of the category. If you are using shallow neural network this will help.
For Ensemble Classifiers you may find following useful.




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!