July 2017
Intermediate to advanced
360 pages
8h 26m
English
To show the power of kernel SVMs, we're going to solve two problems. The first one is simpler but purely non-linear and the dataset is generated through the make_circles() built-in function:
from sklearn.datasets import make_circles >>> nb_samples = 500 >>> X, Y = make_circles(n_samples=nb_samples, noise=0.1)
A plot of this dataset is shown in the following figure:

As it's possible to see, a linear classifier can never separate the two sets and every approximation will contain on average 50% misclassifications. A logistic regression example is shown here:
from sklearn.linear_model import LogisticRegression >>> lr = ...
Read now
Unlock full access