dataset we will use the iris dataset which contains classes of instances eachwhere each class refers to type of iris plant each instance has the four features namely sepal lengthsepal widthpetal length and petal width the svm classifier to predict the class of the iris plant based on features is shown below kernel it is technique used by svm basically these are the functions which take low-dimensional input space and transform it to higher dimensional space it converts non-separable problem to separable problem the kernel function can be any one among linearpolynomialrbf and sigmoid in this examplewe will use the linear kernel let us now import the following packagesimport pandas as pd import numpy as np from sklearn import svmdatasets import matplotlib pyplot as plt nowload the input datairis datasets load_iris(we are taking first two featuresx iris data[:: iris target we will plot the support vector machine boundaries with original data we are creating mesh to plot x_minx_max [: min( [: max( y_miny_max [: min( [: max( (x_max x_min)/ xxyy np meshgrid(np arange(x_minx_maxh)np arange(y_miny_maxh)x_plot np c_[xx ravel()yy ravel()we need to give the value of regularization parameter