O'Reilly logo

Python Data Science Essentials - Third Edition by Luca Massaron, Alberto Boschetti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required