What is a Support Vector Machine (SVM)?
In machine learning, a Support Vector Machine (SVM) is a supervised learning model that can be used for solving regression or classification problems. Let’s say a dataset has n features X=[x1, x2, …, xn]. So, we can think of an n-dimensional space formed by these features. And a hyperplane is an (n-1) dimensional subspace that separates this input variable space.
For example, for a dataset with two features, the features will form a two-dimensional space. And a hyperplane will be a line that separates these points in the two-dimensional space.
In a Support Vector Machine (SVM), the hyperplane is selected to separate the input variables in an n-dimensional space in the best possible way.
The SVM algorithm is implemented using a kernel. And the kernel can be linear, polynomial, or radial kernel. Interested readers, who want to know more about how SVM works, please refer to these youtube videos:
https://www.youtube.com/watch?v=efR1C6CvhmE
https://www.youtube.com/watch?v=Toet3EiSFcM
https://www.youtube.com/watch?v=Qc5IyLW_hns
How to solve regression problems using Support Vector Machines (SVM) in sklearn?
Let’s read the diabetes dataset using the sklearn library. The dataset has several features based on which one can predict the target glucose level of a patient. We can use the following Python code to solve this regression problem using SVM…
0 Comments