# hypothesis

*Entry of the [Dictionary of Applied Machine Learning](https://dictionaryofml.org) (course edition), by Alexander Jung, Aalto University. CC BY 4.0. Updated 2026-10-28. [HTML](https://dictionaryofml.org/terms/hypothesis.html) · [typeset PDF](https://dictionaryofml.org/terms/hypothesis.pdf) · [LaTeX](https://dictionaryofml.org/terms/hypothesis.tex) · [Python demo](https://dictionaryofml.org/terms/hypothesis.py) · [notebook](https://dictionaryofml.org/terms/hypothesis.ipynb)*

Math is LaTeX with the book's macros expanded, so no notation package is needed to read it.

## Abstract

A hypothesis is a map $h: \mathcal{X} \rightarrow \mathcal{Y}$ from the feature space $\mathcal{X}$ to the label space $\mathcal{Y}$. Given a data point with features ${\mathbf x}$, the hypothesis returns a prediction $h({\mathbf x})$ for the label $y$. A machine learning method selects a single learned hypothesis $\widehat{h}$ from a restricted hypothesis space $\mathcal{H} \subseteq \mathcal{Y}^{\mathcal{X}}$. This restriction reflects finite computational resources of a practical machine learning method. An empirical risk minimization-based method finds $\widehat{h}$ by a search that uses the structure of $\mathcal{H}$, e.g., gradient descent on a parametric model.

## Definition

Predicting tomorrow's maximum daytime temperature from today's morning temperature is a typical machine learning task. A hypothesis is the map that performs this prediction. Formally, a hypothesis is a map (also called a function) $h: \mathcal{X} \rightarrow \mathcal{Y}$ from the feature space $\mathcal{X}$ to the label space $\mathcal{Y}$ (Shalev-Shwartz and Ben-David, 2014, Sect. 2.1). Given a data point with features ${\mathbf x}$, the hypothesis $h$ returns an estimate $\widehat{y} = h({\mathbf x})$ of the true label $y$. The same structure, features in and prediction out, appears in a very different application: Fig. 1 shows a hypothesis that predicts a Freddie-likeness score from the samples of an audio recording, i.e., the measured amplitudes at successive time instants.

![Figure 1 of the entry hypothesis](https://dictionaryofml.org/terms/fig/hypothesis-fig1.svg)

*Figure 1: Hypothesis $h: \mathcal{X} \rightarrow \mathcal{Y}$ mapping the features ${\mathbf x} \in \mathcal{X}$ of a data point to a prediction $h({\mathbf x}) \in \mathcal{Y}$ of the label. Here, the machine learning application \urlhttps://freddiemeter.withyoutube.com/ uses the samples of an audio recording as features to predict how closely a person's singing resembles that of Freddie Mercury. The displayed value $h({\mathbf x})=0.82$ indicates an $82\%$ resemblance*

A machine learning method aims to find (or learn) a hypothesis $h$ such that $y \approx h({\mathbf x})$ for any data point with features ${\mathbf x}$ and label $y$. Finite computational resources require restricting the search to a subset of

$$
\mathcal{Y}^{\mathcal{X}} = \big\{ h: \mathcal{X} \rightarrow \mathcal{Y} \big\} \text{,}
$$

the set of all functions from $\mathcal{X}$ to $\mathcal{Y}$. This subset is the hypothesis space $\mathcal{H}$ (also called the model) underlying the method. The output of a machine learning algorithm acting on a training set is a single learned hypothesis $\widehat{h} \in \mathcal{H}$ obtained via empirical risk minimization, i.e., the element of $\mathcal{H}$ that minimizes the empirical risk on the training set. The search does not examine the hypotheses one by one. For a parametric model, whose hypotheses are indexed by a vector of weights, gradient descent moves through $\mathcal{H}$ by following the gradient of the empirical risk, which is possible only because $\mathcal{H}$ carries that structure.

Different hypothesis spaces admit different representations of their hypothesis maps. Polynomial regression (with a single scalar feature $x$) represents each $h \in \mathcal{H}$ as an algebraic expression $h(x) = \sum_{j=0}^{p} w_{j}
x^{j}$, where $p$ is the degree of the polynomial and the coefficients $w_{j}$ are the model parameters. A hypothesis space of computer programs represents $h$ as executable source code, e.g., a Python function with a prescribed signature. A decision tree or an artificial neural network represents $h$ as a signal-flow chart whose nodes apply simple operations (e.g., comparisons, weighted sums, nonlinear activations) and whose edges define the order in which these operations are composed. These representations differ in which functions they can express and in how efficiently the empirical risk minimization problem can be solved over the corresponding $\mathcal{H}$. Fig. 2 shows the three representations side by side.

![Figure 2 of the entry hypothesis](https://dictionaryofml.org/terms/fig/hypothesis-fig2.svg)

*Figure 2: Three representations of a hypothesis map. (a) As an algebraic expression, here a degree-2 polynomial in a scalar feature $x$. (b) As source code, here a Python function. (c) As a signal-flow chart, here a small decision tree that routes a data point to a prediction of $3$, $1$, or $-1$ based on the threshold comparisons on the feature $x$*

**Synonyms:** predictor.

**See also:** function, prediction, predictor, [hypothesis space](https://dictionaryofml.org/terms/hypospace.html), [data point](https://dictionaryofml.org/terms/datapoint.html), [label](https://dictionaryofml.org/terms/label.html), [empirical risk minimization](https://dictionaryofml.org/terms/erm.html).

## References

- Shalev-Shwartz and Ben-David (2014). Understanding Machine Learning: From Theory to Algorithms. *Cambridge Univ. Press*. <https://doi.org/10.1017/cbo9781107298019>

## Cite this entry

```bibtex
@incollection{dictml_hypothesis,
  author = {Jung, Alexander},
  editor = {Olioumtsevits, Konstantina and Schnoor, Ekkehard},
  title = {hypothesis},
  booktitle = {Dictionary of Applied Machine Learning},
  publisher = {Springer Nature Singapore},
  year = {2026},
  doi = {10.1007/978-981-92-2012-0_5-1},
  isbn = {978-981-92-2012-0},
  url = {https://doi.org/10.1007/978-981-92-2012-0_5-1}
}
```
