Dictionary of Applied Machine Learning: 114 machine-learning terms, each with a definition, a figure, citations and a Python demo · All terms · Demos · Start here
Updated on 2026-10-29
Readiness 100/100
See also model validation error training error model selection learning rate gradient descent
A hyperparameter is any quantity that specifies the components of a machine learning (ML) method. Examples are the maximum degree in polynomial regression, the regularization strength in ridge regression, and the number of data points used to construct a training set. Hyperparameters can also determine the behavior of the optimization method used to solve empirical risk minimization (ERM), that is, to train a model; one example is the learning rate in gradient descent (GD). A hyperparameter selects one ML method out of several alternatives and can therefore be chosen by model selection techniques, such as those based on the validation error.

hyperparameter.py, which recomputes what the entry states: the script block by block · open in ColabB-kremsPredicting the maximum temperature of a day at Krems an der Donau from its minimum temperature calls for decisions before any training happens: which maps the method may return, how many data points to collect, and how to search those maps. Fig. 1 shows twelve days as data points, each with the minimum temperature as its feature $x$ and the maximum temperature as its label $y$. Three straight lines depict hypotheses of the underlying hypothesis space, or model, of the machine learning (ML) method. A loss function is used to measure the prediction error incurred on a data point.
B-reachA hyperparameter is any quantity that specifies one of these
components of an ML method. The maximum degree in
polynomial regression specifies the model, the
regularization strength in ridge regression affects the loss function (Bishop, 2006, Sect. 1.3), and the number of
data points gathered specifies the training set.
pythondemos/hyperparameter.pypythondemos/hyperparameter.py
B-dataThe usefulness of a specific hyperparameter value can be assessed by model selection techniques such as validation (Hastie et al., 2009, Sect. 7.10). As with learning the model parameters by ERM on a training set, a hyperparameter is chosen by minimizing the validation error, with the validation error in place of the training error (Bishop, 2006, Sect. 1.3). The search often runs over a grid or a randomly drawn set of candidate values, keeping the one with the smallest validation error on the validation set.
B-sweepFig. 3 shows this choice for the degree
of a polynomial model learned by polynomial regression from $20$
data points. The training error falls with every increase of
the degree and would select the largest one. The validation error on
$100$ further data points is smallest at degree $3$ and rises
steeply beyond it, so validation selects degree $3$.
pythondemos/hyperparameter.py
See also: model, validation, model parameter, validation error, training error, model selection, learning rate, gradient descent, polynomial regression.
@misc{dictml_hyperparameter,
author = {Jung, Alexander},
editor = {Olioumtsevits, Konstantina and Schnoor, Ekkehard},
title = {hyperparameter},
howpublished = {Dictionary of Applied Machine Learning (course edition)},
year = {2026},
doi = {10.5281/zenodo.21569296},
note = {ISBN 978-952-64-3013-3, CC BY 4.0, retrieved 2026-11-03},
url = {https://dictionaryofml.org/terms/hyperparameter.html}
}