April 2017
Beginner to intermediate
358 pages
9h 30m
English
The only new thing here is the use of Support Vector Machines (SVM), which we will cover in the next section (for now, just consider it a standard classification algorithm).
Next, we import our classes. We import the SVC class, an SVM for classification, as well as the other standard workflow tools we have seen before:
from sklearn.svm import SVC from sklearn.model_selection import cross_val_scorefrom sklearn.pipeline import Pipeline from sklearn import grid_search
SVMs take a number of parameters. As I said, we will use one blindly here, before going into detail in the next section. We then use a dictionary to set which parameters we are going to search. For the kernel parameter, we will try linear and ...
Read now
Unlock full access