B43 Exp3 ML
B43 Exp3 ML
Experiment No. 03
A.1 Aim:
To implement a Support Vector Machine.
A.2 Prerequisite:
Python Basic Concepts
A.3 Outcome:
Students will be able To implement a Support Vector Machine. A.4
Theory:
Types of SVM
Linear SVM: Linear SVM is used for linearly separable data, which means if a dataset
can be classified into two classes by using a single straight line, then such data is
termed as linearly separable data, and classifier is used called as Linear SVM classifier.
Non-linear SVM: Non-Linear SVM is used for non-linearly separated data, which means
if a dataset cannot be classified by using a straight line, then such data is termed as
non-linear data and classifier used is called as Non-linear SVM classifier.
SVM algorithm is implemented with kernel that transforms an input data space into
the required form. SVM uses a technique called the kernel trick in which kernel takes
a low dimensional input space and transforms it into a higher dimensional space. In
simple words, kernel converts non-separable problems into separable problems by adding
more dimensions to it. It makes SVM more powerful, flexible and accurate. The
following are some of the types of kernels used by SVM.
Linear Kernel
It can be used as a dot product between any two observations. The formula of
linear kernel is as below −
From the above formula, we can see that the product between two vectors say
𝑥 & 𝑥𝑖 is the sum of the multiplication of each pair of input values.
Polynomial Kernel
● SVM classifiers offers great accuracy and work well with high dimensional
space. SVM classifiers basically use a subset of training points hence in result
uses very less memory.
● They have high training time hence in practice not suitable for large datasets.
Another disadvantage is that SVM classifiers do not work well with overlapping
classes.
PART B
( PART B : TO BE COMPLETED BY STUDENTS)
Roll. No.: B43 Name: Nikhil Aher
**********