Unsupervised learning trains on inputs without manually provided target outputs or ground-truth labels. It discovers structure in the data, estimates its probability distribution, or learns useful representations. section 7.1 section 13.0
In a Gaussian mixture model, unlabeled observations are assigned to latent classes by fitting mixture weights, means, and covariances. For an input x, the class with the largest posterior p(k|x) is selected. Geometrically, this compares variance-normalized distances to cluster means, tolerating greater distance inside widely spread clusters. section 6.9.3
Common unsupervised objectives include:
- Estimate a density whose sampled point cloud overlaps the observed data, then generate new samples or score the probability of new inputs. section 13.0
- Learn a compact representation with an autoencoder: encode an input into a lower-dimensional latent vector, decode it, and minimize reconstruction loss against the original input. section 14.5
Image autoencoder
A convolutional encoder reduces a 32×32 image to a latent vector, while a decoder built with transposed convolutions reconstructs the image. PyTorch computes the reconstruction objective with mean squared error: recon_loss = F.mse_loss(Xr, X).



















