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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.