Types of Machine Learning
1.2 — Types of Machine Learning
Recall first. You receive 10,000 customer records. In one project every record has a known “left / stayed” outcome; in another, no outcome is provided. Which project can directly learn from labels, and what could the second project discover?
The classification question
The most useful first question is:
What feedback does the learner receive?
- Supervised learning: examples include a target or label.
- Unsupervised learning: examples have no supplied target; the algorithm looks for structure in the inputs.
- Reinforcement learning: an agent acts in an environment and receives rewards or penalties over time.
Semi-supervised and self-supervised learning are important variants, but they do not replace the basic distinction: identify what information is available at learning time and what objective is being optimized.12
Supervised learning
A supervised dataset contains pairs (xᵢ, yᵢ). The learner uses the known yᵢ values to learn a function that predicts y for new x.
Classification
Classification predicts a discrete class:
- spam / not spam;
- defective / acceptable;
- disease present / absent;
- one of several recognized species.
The output may be a class label or a score/probability that is later converted into a class using a threshold.
Regression
Regression predicts a numeric quantity:
- house price;
- temperature;
- travel time;
- exam score.
A numeric output does not guarantee that regression is appropriate. The target must have a meaningful numeric interpretation and the loss must match the decision problem.
| Question | Classification | Regression |
|---|---|---|
| Target | Discrete class | Numeric value |
| Example | “Will the machine fail?” | “When will it fail?” |
| Typical output | Label or probability | Number |
| Possible loss | Misclassification / log loss | MAE / MSE |
scikit-learn places linear models, trees, support-vector methods, and neural-network methods into supervised-learning families because they learn from targets supplied with the training examples.3
Unsupervised learning
An unsupervised dataset contains xᵢ but no supplied yᵢ. The goal is not “predict the missing label” unless a later task supplies that interpretation. Common objectives include:
- Clustering: group similar examples.
- Dimensionality reduction: represent data with fewer variables while preserving selected structure.
- Density or anomaly analysis: identify regions of common or unusual behavior.
- Representation learning: construct useful features from raw inputs.
The lack of labels does not mean the method has no objective. It still optimizes a criterion such as within-cluster distance or reconstruction error. The challenge is that a mathematically neat structure may not be useful to a person or application.
Reinforcement learning — the boundary
In reinforcement learning, an agent chooses actions, observes consequences, and receives rewards. The feedback can be delayed: an action may be good because of what it enables many steps later. This differs from supervised learning, where each training example normally comes with a target answer.
Example: a robot learns a navigation policy from rewards for reaching a destination safely. It is not simply given a correct action for every state.
Reinforcement learning is adjacent to the Module I foundations; the core exam distinction is the feedback signal, not memorizing a list of algorithms.
Related variants
- Semi-supervised learning: uses a smaller labelled set together with a larger unlabelled set.
- Self-supervised learning: creates a learning signal from the data itself, such as predicting a hidden part of an input.
- Online learning: updates a model as examples arrive rather than fitting only once to a fixed batch.
These labels describe data or training arrangements. A particular system can combine them with classification, regression, or representation learning.
A decision table for choosing the type
| Situation | Likely starting point | Why |
|---|---|---|
| You have past examples and known outcomes | Supervised | The outcome supplies a learning target |
| You have measurements but no outcomes | Unsupervised | The system must discover structure or representations |
| You can evaluate actions through rewards | Reinforcement | Feedback arrives through interaction |
| You have few labels and many raw examples | Semi/self-supervised | Use unlabelled data to support representation or prediction |
The table is a starting point, not a guarantee. A project can fail because its labels are unreliable, the objective is wrong, or the data available at deployment differs from the training data.
Worked example — classify the problem
A factory records vibration measurements from motors. It has:
- Dataset A: vibration readings plus a label “failed within 30 days / did not fail.”
- Dataset B: vibration readings only, with no failure labels.
- Dataset C: readings from a robot that receives a reward when it reaches a maintenance station efficiently.
Answer: Dataset A supports supervised classification. Dataset B supports unsupervised exploration, such as grouping operating patterns, but clusters are not automatically failure labels. Dataset C is a reinforcement-learning setting because the feedback comes from actions and rewards.
Exercise
Name the learning type and explain your choice:
- Grouping customers into segments with no predefined segment names.
- Predicting the monthly sales amount from past labelled records.
- Learning to play a game using wins, losses, and intermediate rewards.
- Predicting whether a tumour is benign from labelled clinical examples.
Answers
- Unsupervised clustering. 2. Supervised regression. 3. Reinforcement learning. 4. Supervised classification. The deciding clue is the feedback: no labels, numeric labels, reward sequence, or discrete labels.
Exam lens
Three-way comparison: write the available feedback, objective, and example for supervised, unsupervised, and reinforcement learning.
Common traps:
- Unsupervised does not mean “random” or “without an objective.”
- Classification predicts categories; regression predicts numbers.
- A cluster is not automatically a real-world class.
- A probability score is not necessarily the final class label; a decision threshold may be applied later.
Rapid revision
- Can I decide the learning type from the feedback signal?
- Can I distinguish classification from regression?
- Can I explain why an unlabelled cluster is an interpretation, not a guaranteed truth?
- Can I distinguish supervised labels from reinforcement rewards?
Sources
Footnotes
-
Mitchell, T. M. (1997). Machine Learning. McGraw-Hill — supervised learning and learning problem formulation. ↩
-
Alpaydın, E. (2020). Introduction to Machine Learning, 4th Ed. MIT Press — supervised, unsupervised, and reinforcement-learning paradigms. ↩
-
scikit-learn, “Supervised learning.” https://scikit-learn.org/stable/supervised_learning.html — supervised estimator families and targets. ↩