liveBook · Manning

Hyperparameter

As explained in Machine Learning Algorithms in Depth

A hyperparameter is a configuration value set outside the ordinary parameter-learning process that controls a model or learning procedure.

A hyperparameter is a configuration value chosen outside ordinary parameter learning that controls a model or learning procedure. Examples include the number of nearest neighbors, the number of K-means clusters, SVM kernel settings, regularization constants, and neural-network learning rates. Hyperparameters shape model behavior and influence whether learned models underfit, overfit, or generalize to unseen data. section 7.4 section 10.4

Tune hyperparameters by searching a multidimensional configuration space for strong validation performance:

  • Grid search exhaustively evaluates specified combinations and works well for smaller spaces; logarithmic values can help identify the right order of magnitude. section 7.4
  • Random search samples values from prior distributions, can find good configurations faster, and keeps its iteration budget independent of the number of parameters. section 7.4
  • Bayesian optimization models generalization performance with a Gaussian process, then selects candidates using expected improvement or an upper confidence bound. section 7.4.1

Learning rate in stochastic gradient descent

The learning rate determines the size of each gradient step. Values that are too high can miss the optimum, while values that are too low prolong training. A practical strategy starts at 1e-3 and reduces the rate with a schedule; common momentum values include 0.5 and 0.9. section 10.4

Figure 7.12 Bayesian optimization algorithm
figure

Use the algorithm figure to trace Bayesian optimization as it balances exploration and exploitation while incorporating previous objective evaluations. section 7.4.1

How Machine Learning Algorithms in Depth covers it

How deep it goes
Defines configuration choices, derives Bayesian optimization with Gaussian processes, and explains learning-rate dynamics without fully detailing every optimizer.
Examples
Uses nearest-neighbor counts, K-means cluster counts, SVM kernels, regularization constants, learning rates, and momentum values.
What you can do after
Apply it via grid search, random search, or Bayesian optimization to configure SVMs, random forests, and neural-network optimizers.
How it connects
Connects model selection, generalization, grid search, random search, Bayesian optimization, Gaussian processes, stochastic gradient descent, momentum, and regularization.

Also explained in

Compare how 19 books explain hyperparameter →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Algorithms in Depth. The section links point to the parts of the book it draws on.