the main goal of svm is to divide the datasets into classes to find maximum marginal hyperplane (mmhand it can be done in the following two stepsfirstsvm will generate hyperplanes iteratively that segregates the classes in best way thenit will choose the hyperplane that separates the classes correctly implementing svm in python for implementing svm in python we will start with the standard libraries import as followsimport numpy as np import matplotlib pyplot as plt from scipy import stats import seaborn as snssns set(nextwe are creating sample datasethaving linearly separable datafrom sklearn dataset sample_generator for classification using svmfrom sklearn datasets samples_generator import make_blobs xy make_blobs(n_samples= centers= random_state= cluster_std= plt scatter( [: ] [: ] =ys= cmap='summer')the following would be the output after generating sample dataset having samples and clusterswe know that svm supports discriminative classification it divides the classes from each other by simply finding line in case of two dimensions or manifold in case of multiple dimensions it is implemented on the above dataset as followsxfit np linspace(- plt scatter( [: ] [: ] =ys= cmap='summer'