Skip to main content
Once you know how to split data (train/val/test) and evaluate generalization, it’s useful to step back and compare the main kinds of machine learning problems. A core distinction is between supervised and unsupervised learning — two approaches that differ in whether labeled examples are available.

Supervised learning

Supervised learning trains models from examples that include the correct answers (labels). The workflow is:
  • Provide inputs (features) and their corresponding labels.
  • The model makes predictions from inputs.
  • A loss function compares predictions to labels.
  • The model updates its parameters to reduce the loss.
Typical examples:
  • House-price prediction: each past home has features (square footage, bedrooms, neighborhood) and a final sale price. The model learns to predict that numeric target (regression).
  • MNIST: a dataset of handwritten digits where each image is paired with the correct digit (0–9). The task is image classification — learn a mapping from pixels to digit labels.
  • ImageNet: a large image dataset organized around object categories. Models classify images into many categories (dogs, cars, birds, etc.). It follows the same supervised pattern: each image has a known label and the model learns from those labeled examples.
A black slide displaying a white-bordered grid of many small sample photos (examples from ImageNet) with a handwritten "ImageNet" label and arrow. The caption below reads "image dataset (object)."

Unsupervised learning

Unsupervised learning finds structure, patterns, or groups in data that has no labels. Because there is no “correct answer,” the model looks for useful structure in the inputs themselves. Common use cases:
  • Clustering similar items together (customer segmentation, image grouping).
  • Dimensionality reduction for visualization or preprocessing (PCA, t-SNE, UMAP).
  • Density estimation and anomaly detection.
Example scenarios:
  • Houses without sale prices: given only features (sqft, beds, area), an unsupervised model can discover clusters such as downtown condos, suburban family homes, or luxury properties.
  • Customer segmentation for streaming services: group users by viewing behavior (fans of a sport, binge-watchers, early-morning kids’ programming viewers) without manual labeling.
A hand-drawn chalkboard-style diagram showing a house-prices dataset table (sqft, beds, area) with the price labels highlighted. Arrows connect the table to a simple neural-network sketch and notes contrasting supervised and unsupervised learning.
The core idea is the same across domains: use algorithms to reveal natural groups or structure in unlabeled data.
A hand-drawn diagram on a black background showing a data pipeline for a streaming platform: a "Dataset" of simple person icons is fed into an "unsupervised" process that produces a neural-network-style "Model," with annotations about customer segmentation. The sketch includes boxed user groups and notes like "love island" and "not labelled."

Quick comparison

Label types in supervised learning

A useful follow-up distinction in supervised tasks is the type of label you predict:
  • Regression — predict continuous numeric values (e.g., house price).
  • Classification — predict discrete categories (e.g., spam vs. not spam, digit 0–9).
Regression predicts continuous numeric targets. Classification predicts discrete labels. Both require labeled training data and are therefore supervised learning tasks.

Example dataset (house prices)

This table shows features (sqft, beds, area) and a numeric label (price), which makes the supervised task a regression problem.

Key takeaways

  • Supervised learning: model learns to predict known labels from input features (regression, classification).
  • Unsupervised learning: model discovers patterns and structure in unlabeled data (clustering, dimensionality reduction).
  • Choose supervised methods when labeled data and specific prediction goals are available; choose unsupervised methods when you want to explore data structure or segment data without labels.

Further reading

Watch Video