Machine Learning Fundamentals interview question · Most asked

What is the difference between supervised, unsupervised and reinforcement learning?

Comparison Asked in Machine Learning Engineer interviews

Members can save this page, take notes and track progress. See membership · Sign in

Summary

Supervised learning trains on labelled examples to predict a target (price, spam or not). Unsupervised learning finds structure in unlabelled data (clusters, lower-dimensional representations, anomalies). Reinforcement learning trains an agent through trial and error to maximise a reward over time.

Longer Answer

  • Supervised: regression (continuous target) and classification (categories). Needs labels, which are often the expensive part.
  • Unsupervised: k-means, DBSCAN, PCA, autoencoders, anomaly detection. Used for exploration, segmentation and as features for supervised models.
  • Self-supervised learning (how large language models are pre-trained) creates labels from the data itself, such as predicting the next token.
  • Reinforcement learning: an environment, actions, rewards and a policy; used for games, robotics, recommendation and fine-tuning language models from human feedback (RLHF).

Key Points

  • Supervised: labels, predict a target.
  • Unsupervised: structure without labels.
  • Reinforcement: rewards from actions over time.
  • Self-supervised pre-training underlies LLMs.

Explanation

What interviewers look for

Clear distinctions with a realistic example of each, and knowing where self-supervised learning fits.

More Machine Learning Fundamentals questions

← All Machine Learning Fundamentals questions

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake