Course Content
Machine Learning Foundations
14 sections · 70 lessons
What are the main types of Machine Learning?
What you need to know
The type of learning depends on one question: what feedback does the algorithm get?
Supervised learning: learning with an answer key
Every training example has input features and a label. The algorithm learns to map inputs to the label, and you can measure how often it is right.
- Classification predicts a category: spam or not spam, will this telecom customer churn or not.
- Regression predicts a number: the price of a flat in Bengaluru, delivery time in minutes.
This is the most common type in industry because businesses already record outcomes: who repaid, who cancelled, what sold.
Unsupervised learning: finding structure without answers
There is no label. The algorithm looks for groups, patterns or outliers in the inputs alone.
- Clustering groups similar records, such as customer segments for marketing.
- Dimensionality reduction compresses many columns into a few, for example PCA.
- Anomaly detection flags records that do not look like the rest.
Reinforcement learning: learning from rewards
An agent takes actions in an environment and receives a reward signal. Nobody gives it the correct action; it discovers which actions lead to high reward over time. Examples are game-playing systems, robot control, and RLHF (reinforcement learning from human feedback), which tunes chat models to give answers people prefer.
Two in-between types worth naming
- Semi-supervised — a small labelled set plus a large unlabelled set. Useful when labelling is expensive, such as medical scans a doctor must read.
- Self-supervised — the labels come from the data itself. An LLM is pretrained by hiding the next word and predicting it, so every sentence on the internet becomes a free training example.
| Type | Feedback | Typical output | Example |
|---|---|---|---|
| Supervised | Correct answer per example | Class or number | Loan default: yes or no |
| Unsupervised | None | Groups, scores, compressed features | Shopper segments |
| Reinforcement | Reward after actions | A policy (what to do next) | Game-playing agent |
| Self-supervised | Labels made from the data | Learned representations | LLM next-word pretraining |
A real-life example
An e-commerce company uses all three types at once:
- Supervised: a model trained on past orders predicts whether a cash-on-delivery order will be returned, labelled "returned" or "delivered".
- Unsupervised: clustering on browsing and purchase history finds five shopper segments, such as "festival-season buyers" and "discount hunters", that nobody defined in advance.
- Reinforcement: a recommendation system tries showing different products on the home page, and a click or purchase acts as the reward, so it gradually learns what to show whom.
Follow-up questions to expect
- "Which type is used most in industry?" — Supervised learning, because most business problems come with historical outcomes, such as sales, repayments or cancellations.
- "Is LLM training supervised or unsupervised?" — Pretraining is self-supervised (predict the next token). Instruction tuning is supervised, and RLHF adds a reinforcement learning step.
- "How is reinforcement learning different from supervised?" — Supervised gets the correct answer for each example. Reinforcement learning only gets a reward, often delayed, and must work out which actions caused it.