Skip to content
UniCircle
EasyConceptualMachine learning basics

Supervised vs unsupervised vs reinforcement learning

Question DS-ML-001

Explain the three main types of machine learning, with one realistic example of each. Where does semi-supervised or self-supervised learning fit?

Show the explanation
SupervisedUnsupervisedReinforcement
Datainputs with labels (x, y)inputs only, no labelsan agent acting in an environment and receiving rewards
Goallearn a mapping x → yfind structure: groups, patterns, a compact representationlearn a policy that maximises long-term reward
Typical tasksclassification (spam or not), regression (house price)clustering, dimensionality reduction, anomaly detectiongame playing, robotics, resource scheduling
Example algorithmslinear/logistic regression, decision trees, random forests, gradient boosting, neural networksk-means, DBSCAN, hierarchical clustering, PCA, autoencodersQ-learning, policy gradients, actor–critic

Examples

  • Supervised: predicting whether a loan applicant will default, from past applications labelled "defaulted" or "repaid".
  • Unsupervised: grouping a food-delivery app's customers into segments by order behaviour, without being told what the segments are.
  • Reinforcement: a warehouse robot learning a route that minimises travel time. It gets a reward for each delivery and a penalty for collisions.

In between

  • Semi-supervised: a few labelled examples and many unlabelled ones. Example: 500 hand-labelled X-rays plus 50000 unlabelled ones.
  • Self-supervised: the labels are created from the data itself, such as predicting a masked word or the next token. This is how large language models are pre-trained. They are then often fine-tuned with supervised data and with reinforcement learning from human feedback (RLHF).

Interview tip: choose the type from the data you actually have. Labelled outcomes suggest supervised learning. Only raw records suggest unsupervised exploration first. Sequential decisions with feedback suggest reinforcement learning.

Original UniCircle question. Last reviewed 22 Oct 2026.