An Intuitive Guide to understand Support Vector Machine — Part 3
TL; DR
The topic is covered in 3-part series:
- An Intuitive Guide to understand Support Vector Machine — Part 1 — Concepts behind SVM.
- An Intuitive Guide to understand Support Vector Machine — Part 2 — Support Vector Machines.
- An Intuitive Guide to understand Support Vector Machine — Part 3 — Multiclass Classification with SVM using Python Code.
SVMs do not naturally generalize for multi-class. They can be extended to multi-class problems by using one-versus-one and one-versus-all approaches.
For purpose of demonstration, let us use the IRIS dataset.
Note: The purpose is to demonstrate the capability of SVM and not create the best model for the dataset.
One-Versus-One
In a multi-class problem, One-Versus-One approach builds K(K-1)/2 SVMs and the final classification is done on the basis of majority voting.
One-Versus-All
In a multi-class problem, One-Versus-All approach builds K SVMs each time comparing one of the classes with K-1 classes. The final classification is done on the basis of the widest margin, i.e., the value for which the below Equation (1) has the largest value.
Cheers!
Happy Learning!