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

unsupervised learning

Updated on 2026-11-04

Readiness 100/100

▶ Run the Python demo Open in Colab Typeset PDF LaTeX source Markdown Cite this entry

See also clustering $k$-means dimensionality reduction principal component analysis feature learning label dataset empirical risk minimization loss supervised learning self-supervised learning

Unsupervised learning refers to machine learning (ML) methods that do not require knowledge of the label of any data point. These methods learn a hypothesis by loss functions that are constructed from the features of data points only. Two important examples of unsupervised learning are clustering and dimensionality reduction. Clustering methods use some notion of clustering error to learn model parameters that encode a cluster structure. Dimensionality reduction methods construct a loss from the reconstruction error.

Figure produced by the Python demo of the entry unsupervised learning
Figure written by the entry's Python demo unsupervisedlearning.py, which recomputes what the entry states: the script block by block · open in Colab

Definition

B-dataTwenty days at Krems an der Donau are each characterized by two features, the daily minimum and the daily maximum temperature, and nothing else is recorded about them (Fig. 1). Unsupervised learning methods learn a hypothesis map that predicts a label that is not known for any of these data points. For example, the label could be an index that selects one out of two clusters to which the data point belongs. Another label could be the optimal scalar representation of a data point.

Formally, an unsupervised machine learning (ML) method learns a hypothesis out of a hypothesis space based on an unlabeled dataset $\mathcal{D} = \big\{ {\mathbf x}^{(1)}, \ldots, {\mathbf x}^{(m)} \big\}$ of feature vectors ${\mathbf x}^{(r)} \in \mathcal{X}$, with no label space. The model parameters are typically learned by an instance of empirical risk minimization (ERM), minimizing the average loss over the dataset, \[ \widehat{h} \in \mathop{\mathrm{arg\,min}}_{h \in \mathcal{H}} \frac{1}{m} \sum_{r=1}^{m} L\left({\mathbf x}^{(r)},h \right) \text{.} \] What sets unsupervised methods apart from supervised methods, such as linear regression, is the choice of loss function.

B-figTwo important families of unsupervised methods are obtained by specific constructions of the loss, clustering and dimensionality reduction. The clustering method $k$-means uses $k$ cluster centroids as model parameters ${\mathbf w} = \big\{ {{\mathbf w}}^{(1)}, \ldots, {{\mathbf w}}^{(k)} \big\}$ (Hastie et al., 2009, Sect. 14.3.6). They are learned by minimizing the average clustering error, the loss \[ L\left({\mathbf x},{\mathbf w} \right) = \min_{c = 1, \ldots, k} \left\lVert {\mathbf x} - {{\mathbf w}}^{(c)} \right\rVert_{2}^{2} \text{.} \] Principal component analysis (PCA) is a dimensionality reduction method that learns a linear feature transformation ${\mathbf x} \mapsto {\mathbf W} {\mathbf x}$ together with a reconstruction map ${\mathbf z} \mapsto {\mathbf R} {\mathbf z}$ that rebuilds the feature vector from it. Both are model parameters, and for a given ${\mathbf R}$ the loss of a data point is its reconstruction error \[ L\left({\mathbf x},\left( {\mathbf W},{\mathbf R} \right) \right) = \left\lVert {\mathbf x} - {\mathbf R} {\mathbf W} {\mathbf x} \right\rVert_{2}^{2} \text{.} \] One ${\mathbf R}$ is used for the whole dataset, and ERM learns it together with ${\mathbf W}$ by minimizing the average of this loss (Hastie et al., 2009, Sect. 14.5.1). For the learned pair the reconstruction is the orthogonal projection of the feature vector on a subspace of dimension $d'$. Fig. 1 shows both on the Krems days: the two cluster centroids with the data points assigned to each, and the learned direction with the orthogonal projections that give each day its single number.

Figure 1 of the entry unsupervisedlearning
Figure 1: Twenty weather recordings at Krems an der Donau, each a data point with two features and no label. The clustering method $k$-means learned the two cluster centroids (filled squares), and the solid ellipses enclose the data points assigned to each. The dashed line carries the direction learned by a linear feature transformation. The filled triangles mark the orthogonal projections, which represent each data point by a single number, the location of the triangle along the dashed line. No label entered either computation. Data generated by pythondemos/unsupervisedlearning.py

See also: clustering, $k$-means, cluster centroid, dimensionality reduction, principal component analysis, feature transformation, feature learning, label, dataset, empirical risk minimization, loss, supervised learning, self-supervised learning, semi-supervised learning, clustering error.

References

  1. Hastie et al. (2009). The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer Science+Business Media. doi.org/10.1007/978-0-387-84858-7

Cite this entry

@misc{dictml_unsupervisedlearning,
  author = {Jung, Alexander},
  editor = {Olioumtsevits, Konstantina and Schnoor, Ekkehard},
  title = {unsupervised learning},
  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-04},
  url = {https://dictionaryofml.org/terms/unsupervisedlearning.html}
}