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

Sunil Kumar SV
2 min readJul 20, 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 “Kernel SVN (Kernel Support Vector Machine)” (using Python). You can treat this as FAQ’s as well.

Where does ‘Kernel SVM’ help over SVM?

SVM helps in places where there can be a linear separation between classifications. However, we may come across datasets where a liner separation is not possible. This is the place where Kernel SVM help.

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

Whats the basic working of Kernel SVM?

When we have a dataset (2 independent variables, thus in 2D space)which is not linearly separable, what we try to do is, to add another dimension to the dataset. We add another diemension to the dataset by using something called as ‘Mapping Function’. When we use a mapping function, we get the data plotted in a 3D space (1D added to our original 2D) and then we can have a hyperplane (a line in 3D space) which gives us the separation.

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

Whats are the drawbacks of Kernel SVM?

When trying to map to a higher dimension (implementing Kernel SVM), the whole operation is extremely compute intensive. And thus, this requires a great amount of computing power (read Hardware!).

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

What are different types of Kernel SVM?

Gaussian RBF
Sigmoid
Polynomial

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

Sample code for Kernel SVM?

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

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

Next :- Data Science (Python) :: Naive Bayes

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

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

--

--

Sunil Kumar SV

#ProductManager #TechEnthusiast #DataScienceEnthusiast #LoveToSolveProblemsUsingTech #Innovation