Auto-sklearn
One of our favorite libraries, good old scikit-learn, was always going to be one of the first targets for building a popular AutoML library. One of the very powerful features of auto-sklearn
is that its API has been designed so that the main objects that optimize and section models and hyperparameters can be swapped seamlessly into your code.
As usual, an example will show this more clearly. In the following example, we will assume that the wine
dataset (a favorite for this chapter) has already been retrieved and split into train and test samples in line with other examples, such as the one in the Detecting drift section:
- First, since this is a classification problem, the main thing we need to get from
auto-sklearn
is theautosklearn.classification
object:
import numpy as np
import sklearn.datasets
import sklearn.metrics
import autosklearn.classification
- We must then define our
auto-sklearn
object. This provides several parameters that help us define how the model and...