liveBook · Manning

Unsupervised learning

As explained in Machine Learning Algorithms in Depth

Unsupervised learning is a machine learning paradigm that learns structure or representations from data without labeled target outputs.

Unsupervised learning uses observations without training labels to discover patterns or learn representations. Unlike supervised learning, it has no target output y for each input x. The question is not whether a prediction matches a supplied answer, but what structure the observations reveal. section 8.0 section 1.1

Different algorithms seek different kinds of structure:

  • Clustering groups observations. Dirichlet process K-means extends K-means so the number of clusters can grow with the data. section 8.5
  • Density modeling represents a distribution with a Gaussian mixture model. Expectation-Maximization alternates between inferring missing values given current parameters and updating the means, covariances, and mixture proportions. section 8.5
  • Dimensionality reduction projects high-dimensional observations into fewer dimensions while retaining useful characteristics. PCA maximizes projected variance; t-SNE can produce results sensitive to perplexity and successive runs. section 8.5

Unsupervised learning also includes neural representations. An autoencoder learns to reconstruct its input; its bottleneck can serve for dimensionality reduction or feature extraction. A variational autoencoder (VAE) maps observations to a latent representation and decodes that representation into a reconstruction. section 11.7

Detecting an unusual time-series signal

Train an LSTM-VAE on nonanomalous sensor signals without anomaly labels. For each signal xᵢ, the model estimates Gaussian parameters μᵢ and σᵢ and evaluates log p(xᵢ | μᵢ, σᵢ). Training maximizes average log likelihood while shaping the joint latent space toward a standard normal distribution through KL divergence. A drop in log likelihood can then be thresholded to signal an anomaly. section 11.1.1

Figure 1.2 Unsupervised learning: clusters of data points projected onto 2-dimensional space
figure

A two-dimensional projection makes the clustering goal visible as groups of data points. section 1.1

How Machine Learning Algorithms in Depth covers it

How deep it goes
Explains several algorithm families and Expectation-Maximization steps, then develops a VAE anomaly detector with an objective and implementation.
Examples
Uses customer segmentation, image features, projected clusters, and time-series anomaly detection with an LSTM-VAE.
What it assumes
Introduces the absence of labels through a supervised-learning contrast, then uses Gaussian likelihood and KL divergence in its neural example.
What you can do after
Build it from scratch using Keras/TensorFlow to train an LSTM-VAE and flag likelihood drops in sensor data.
How it connects
Connects clustering, Gaussian mixture models, Expectation-Maximization, PCA, t-SNE, autoencoders, and variational autoencoders.

Also explained in

Compare how 20 books explain unsupervised learning →

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.