11. Tuning Hyperparameters and Pipelines

In [1]:

# setup
from mlwpy import *
%matplotlib inline

iris     = datasets.load_iris()
diabetes = datasets.load_diabetes()
digits   = datasets.load_digits()

We’ve already introduced models, parameters, and hyperparameters in Section 5.2.2.4. I’m about to bring them up again for two reasons. First, I want you to see a concrete analogy between (1) how we write simple Python functions in different ways by varying their code and arguments and (2) how learning models use parameters and hyperparameters. Second, we’ll turn our attention towards choosing good hyperparameters. When we fit a model, we are choosing good parameters. We need some sort of well-defined process to choose good ...

Get Machine Learning with Python for Everyone now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.