SVM for classification

The implementations for SVM classification offered by scikit-learn are shown here:

Class

Purpose

Hyperparameters

sklearn.svm.SVC

The LIBSVM implementation for binary and multiclass linear and kernel classification

C, kernel, degree, and gamma

sklearn.svm.NuSVC

Same as for the .SVC version

nu, kernel, degree, and gamma

sklearn.svm.OneClassSVM

Unsupervised detection of outliers

nu, kernel, degree, and gamma

sklearn.svm.LinearSVC

Based on LIBLINEAR; it is a binary and multiclass linear classifier

Penalty, loss, and C

 

As an example for classification using SVM, we will use SVC with both a linear and an RBF kernel (RBF stands for Radial Basis Function, which is an effective nonlinear ...

Get Python Data Science Essentials - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.