Algorithms for imbalanced multi class classification in Matlab?
9 views (last 30 days)
Show older comments
Hi,
I have been browsing for quite a while both in the state of the art and statistical packages around and I am having some difficulties on finding available algorithms. I notice some implementations for the imbalanced problem have already been posted in Matlab but they were focused on imbalanced two class. My situation is more dry. Most if not all algorithms I came across on academia did not release their algorithms.
My data has two rare classes and 3 other classes who can be considered majority.
Thank you,
Carlos
0 Comments
Accepted Answer
Ilya
on 13 Oct 2012
I described approaches for learning on imbalanced data here http://www.mathworks.com/matlabcentral/answers/11549-leraning-classification-with-most-training-samples-in-one-category This advice is applicable to any number of classes.
If you have Statistics Tlbx in R2012b, I recommend RUSBoost algorithm available from fitensemble function. It is described here http://www.mathworks.com/help/stats/ensemble-methods.html#btfwpd3 and an example is shown here http://www.mathworks.com/help/stats/ensemble-methods.html#btgw1m1
5 Comments
Ilya
on 14 Oct 2012
RUSboost uses AdaBoost.M2 algorithm underneath. This is a multiclass algorithm proposed by Freund and Schapire. It is not reducible to one-vs-all strategy. I don't remember a published reference off top of my head, but a google search finds this http://users.eecs.northwestern.edu/~yingwu/teaching/EECS510/Reading/Freund_ICML96.pdf. An observation is assigned to the class with the largest score.
You need Statistics Tlbx R2012b. For licensing and trial questions, please call our customer support.
med djo
on 11 Jan 2017
Hello Sir, Assuming that you have three different classes (1,2,3). The first class contains two samples, the second contain one, the third contain one. From each class, you will extract two values (Average and median) of the color (for example). It will give you that: classe 1: (15, 20) classe 1: (16, 21) classe 2: ( 18, 22) classe 3: (22, 24) . On matlab, we make a matrix (Matrix for learning), which contains two columns, four lines and which contain (15, 20; 16, 21;18, 22; 22, 24). And we made a matrix composed of a single column (label matrix), this matrix (1, 1, 2, 3). We execute learning SVM with SVMtrain from libSVM. The parameters I have given you as an example correspond to the RBF kernel. The gamma value, c (varies between 10 and 100,000). Please, can you help me to execute this scenario in Matlab using LibSVM?? Thanks
More Answers (1)
Walter Roberson
on 13 Oct 2012
Usually multi-class problems are handled by doing pairwise discrimination. Class 1 vs everything else, to pull out class 1. Take the "everything else" and run it against class 2 to get class 2 and a new "everything else". And so on.
You can find the algorithms for multi-class SVM (e.g.), but the papers warn that it is computationally very expensive even just for 3 classes.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!