For this recipe, we will apply a non-linear kernel to split a dataset.
Implementing a non-linear SVM
Getting ready
In this section, we will implement the preceding Gaussian kernel SVM on real data. We will load the iris dataset and create a classifier for I. setosa (versus Non-setosa). We will see the effect of various gamma values on the classification.
How to do it...
We proceed with the recipe as follows:
- We first load the necessary libraries, which includes the scikit-learn datasets so that we can load the iris data. Then, we will start a graph session. Use the following...