Skip to main content

Model Landscape

Docs: scikit-learn user guide · Clustering · Decomposition · Outlier detection · Spinning Up in Deep RL

Overview​

This page is the map of model families beyond the two supervised pages: unsupervised methods, deep learning and reinforcement learning. Use it to name the paradigm before picking a model, because the paradigm narrows the choice immediately. The failure people hit is forcing a familiar paradigm onto the wrong data: training a classifier with 40 labelled failures when an anomaly detector needs none.

Figure M3-1: Choosing a paradigm. Amber marks the two problems this section covers in depth: Regression and Classification.

Key concepts​

Learning paradigms​

ParadigmData you haveGoal
SupervisedLabelled input-output pairsPredict a label or value for new inputs
UnsupervisedUnlabelled data onlyFind structure, groups or outliers
Semi-supervisedMostly unlabelled plus a small labelled setUse unlabelled data to improve a supervised model (self-training, pseudo-labelling)
Self-supervisedUnlabelled data with labels made from the data itselfPre-train representations (foundation models)
ReinforcementRewards from interacting with an environmentLearn a policy that maximises cumulative reward

Supervised learning has its own section: → See Supervised Learning.

Clustering​

AlgorithmUse when
K-MeansKnown number of clusters, roughly spherical, large data
DBSCANUnknown number, arbitrary shapes, noise to ignore
Hierarchical (agglomerative)Small data, want a dendrogram, unknown number
Gaussian MixtureSoft assignments, elliptical clusters

Dimensionality reduction​

AlgorithmUse whenAvoid when
PCALinear compression, removing correlated features before a modelStructure is non-linear
t-SNE2-D or 3-D pictures of high-dimensional dataYou need distances between clusters to mean something
UMAPSame as t-SNE, faster, keeps more global structureFeeding the output to a model without validation
AutoencoderNon-linear compression; anomaly scores from reconstruction errorSmall data

Anomaly detection​

Use anomaly detection when failures are too rare to label, or when you want "unusual" rather than "known failure".

AlgorithmUse when
Isolation ForestDefault. Fast, scales, no distribution assumptions
One-Class SVMHigh-dimensional data with a clean "normal" training set
Autoencoder (reconstruction error)Images, sequences, raw sensor waveforms
LOF (Local Outlier Factor)Density-based, local anomalies

On the plant data, multivariate detectors catch impossible combinations a univariate rule misses: high load with zero vibration is a dead sensor (outliers).

Ensembles​

MethodMechanismFixesExamples
BaggingModels in parallel on random subsets; averageVarianceRandom Forest
BoostingModels in sequence, each on the last one's errorsBiasXGBoost, LightGBM, CatBoost
StackingA meta-model learns from base models' predictionsBoth, at a complexity costCompetition pipelines

→ See bagging vs boosting.

Deep learning​

Use deep learning when inputs are unstructured (images, text, audio, raw waveforms) or tabular accuracy has plateaued on very large data.

ArchitectureBest for
MLPTabular data with rich features → MLP classifier
CNNImages, spatial data, local patterns in time series
RNN / LSTM / GRUSequences; mostly replaced by transformers
TransformerText, vision, multimodal; state of the art for most tasks
GANImage synthesis, data augmentation
VAEGeneration with a controllable latent space
DiffusionHigh-quality image and audio generation

Reinforcement learning​

Use RL when a reward signal exists, the environment can be simulated, and the best policy isn't known up front.

Algorithm classApproachExamples
Value-basedLearn action values; act greedily on themDQN, Double DQN
Policy-basedOptimise the policy directlyREINFORCE, PPO
Actor-criticCombine value and policy for lower varianceA2C, SAC, TD3
Model-basedLearn a world model, plan inside itAlphaZero, Dreamer

Roadmap​

Planned deep-dive pages, in priority order: anomaly detection and clustering on plant sensor data, time-series forecasting, neural networks and deep learning, and dimensionality reduction.

Gotchas​

  • Classifying with a handful of labels. 40 failures can't train a reliable classifier. Try anomaly detection, or semi-supervised learning.
  • Reading t-SNE distances. Cluster sizes and gaps in a t-SNE plot aren't meaningful. Use it to look, not to measure.
  • K-Means on non-spherical clusters. It splits elongated groups and merges nearby ones. Use DBSCAN or a Gaussian mixture.
  • Deep learning on small tabular data. Gradient boosting usually wins. Earn the network with data volume or unstructured inputs.
  • RL without a simulator. Learning by trial and error on real equipment is expensive and unsafe. Start with supervised or rule-based control.

Scenario questions​

Q1 ★ You have 10,000 machines' sensor data but only 40 labelled failures. What approach?

Model answer
  • Clarify: do we need "will it fail" or "is it behaving unusually"?
  • Observe: 40 positives are too few for a classifier to learn stable boundaries.
  • Hypothesise: most machines are normal, so an anomaly detector can learn "normal" without failure labels.
  • Fix: Isolation Forest on the sensor features; check whether the 40 failures score as anomalous.
  • Prevent: collect labels as alarms are investigated, then move to supervised. The trade-off is alarms that are unusual but harmless.

Q2 ★★ When would you choose a neural network over gradient boosting?

Model answer
  • Clarify: what's the input type, and how much data?
  • Observe: on 10,000 tabular rows the MLP scored 0.85 AUC against tuned XGBoost's 0.87.
  • Hypothesise: boosting dominates small and medium tabular data; networks win on unstructured inputs or very large data.
  • Fix: boosting for the tabular failure model; a network if inputs become raw vibration waveforms or the fleet grows to hundreds of thousands.
  • Prevent: benchmark against tuned boosting before committing to a network. The trade-off is giving up end-to-end feature learning.

Summary​

  • Name the paradigm first. Labels, no labels, few labels or rewards decide the model family.
  • Few labels point to anomaly detection. Learn "normal" when failures are too rare to learn from.
  • Bagging fixes variance, boosting fixes bias. Stacking trades complexity for a little of both.
  • Deep learning earns its place with unstructured data or scale. On small tabular data, boosting wins.
  • RL needs a reward and a simulator. Without both, it isn't the tool.