- In your MTLAB command window, enter the following commands:
One-vs-one with SVM in Classification Learner
5 views (last 30 days)
Show older comments
Hello,
I have tried to use Classification Learner with Quadratic kernel SVM to classify the data that include four classes, Normal, Low, Medium and High. So, If I choose one-vs-one for binary class, I will receive 6 binary classifiers from (k*(k-1))/2.
First question, the pattern of 1 binary classifier will be similar in the equation in the picture, right?. So, 6 classifiers is High-Low, High-Medium, High-Normal, Low-Medium,Low-Normal, and Medium-Normal ,right?
Second question, I would like to know that how one-vs-one of Classification Learner work to predict class from 6 binary classifiers.
Thank you
0 Comments
Answers (1)
Anay
on 5 Mar 2025
Hi Nuchaba,
Your approach is correct. If you choose one-versus-one Coding Design, you will have “K(K – 1)/2” binary learners for “K” number of classes.
“How Classification Learner predicts class?” depends on the decoding scheme. You can use either the “Loss-based” decoding which means that the predicted class will be the one which has the lowest average binary loss across all the binary learners or the “Loss-weighted” decoding which means that the predicted class will be the one with lowest average binary loss across the binary learners corresponding to that class.
You can find more information on the Coding Design, binary loss in the MATLAB documentation by following the below steps:
>>doc fitcecoc
This will open documentation for the “fitcecoc” function
2. Navigate to the More About section to find documentation of the Binary Loss and Coding Design.
I hope this helps!
0 Comments
See Also
Categories
Find more on Classification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!