Plot different SVM classifiers in the iris dataset
Comparison of different linear SVM classifiers on a 2D projection of the iris dataset. We only consider the first 2 features of this dataset:
Sepal length
Sepal width
This example shows how to plot the decision surface and the support vectors for four SVM classifiers with different kernels.
The linear models LinearSVC() and SVC(kernel='linear') yield slightly
different decision boundaries. This can be a consequence of the following
differences:
LinearSVCminimizes the squared hinge loss whileSVCminimizes the regular hinge loss.LinearSVCuses the One-vs-All (also known as One-vs-Rest) multiclass reduction whileuses the One-vs-One multiclass reduction.
