liveBook · Manning

Hyperparameter tuning

As explained in Bayesian Optimization in Action

Hyperparameter tuning is the process of selecting machine-learning configuration values that optimize a specified performance objective.

Hyperparameter tuning selects model configuration values that optimize a performance measure such as predictive accuracy. It becomes difficult when each trial requires expensive training and only a few evaluations are available. section 1.1.1 section 1.1.2

A tuning task typically involves:

  • Choosing configuration values such as neural-network depth, decision-tree depth, node size, split criterion, SVM regularization, or kernel parameters. section 1.1.1
  • Querying the objective by training or evaluating the model at a selected setting and recording its performance. section 1.1.2
  • Selecting promising next trials rather than exhaustively testing every setting when computation or time is limited. section 1.1.1 section 1.2.4

Choosing neural-network depth

A model reaches 72% accuracy with 5 layers, 81% with 10 layers, and 75% with 20 layers. Because training takes several days, the next trial should focus on promising values rather than scanning every possible depth. Bayesian optimization can balance exploring uncertain regions with exploiting regions that already look strong. section 1.1.1 section 1.2.4

Table 1.1 An example of a hyperparameter tuning task (view table figure)

Number of layers

Accuracy on the test set

5

0.72

10

0.81

20

0.75

Compare tested layer counts with their observed test accuracy before deciding where additional trials may be worthwhile. section 1.1.1

How Bayesian Optimization in Action covers it

How deep it goes
Defines queries and expensive black-box objectives, then develops Bayesian search while stopping short of a complete tuning workflow.
Examples
Uses neural-network depth, decision-tree settings, SVM parameters, an accuracy table, and simulated SVM accuracy surfaces.
What you can do after
Apply it via Bayesian optimization to prioritize promising model configurations when evaluations are expensive.
How it connects
Connects model selection, Bayesian optimization, random search, grid search, exploration, exploitation, and black-box optimization.

Also explained in

Compare how 18 books explain hyperparameter tuning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bayesian Optimization in Action. The section links point to the parts of the book it draws on.