Data Science (Python) :: SVM (Support Vector Machine)

Sunil Kumar SV
2 min readJul 19, 2017

--

Intention of this post is to give a quick refresher (thus, it’s assumed that you are already familiar with the stuff) of concept of “SVN (Support Vector Machine)” (using Python). You can treat this as FAQ’s as well.

Whats so special of SVM’s?

Most of the classification algorithms work on the basis of finding a pattern based on the most commonly occuring phenomenon. Whereas, SVM algorithm looks for the least commonly occuring phenomenon.

For e.g, If we have a problem statement of identifying Cats & Dogs from given pictures and we are training the algorithm using 500 pictures of Cats and 500 pictures of Dogs. Most of the classification algorithms put most commonly occurring features of Cats on one side and most commonly occurring features of Dogs on the other side. And then, the algorithm predicts based on this. However, in SVM, algorithm looks for a Cat which looks close to a Dog and looks for a Dog which looks close to a Cat. And based on this extreme points, the algorithm predicts whether a picture is of a Cat or a Dog.

******************************************

Sample code for implementing SVM algorithm?

from sklearn.svm import SVC
classifier = SVC(kernel = ‘rbf’, random_state = 0)
classifier.fit(X_train, y_train)

Next :- Data Science (Python) :: Kernel SVM (Kernel Support Vector Machine)

Prev :- Data Science (Python) :: K-NN (K - Nearest Neighbors)

If you liked this article, please hit the ❤ icon below

--

--

Sunil Kumar SV

#ProductManager #TechEnthusiast #DataScienceEnthusiast #LoveToSolveProblemsUsingTech #Innovation