What are the main types of machine learning, and when do we use labelled versus unlabelled data?
Distinguish supervised, unsupervised and reinforcement learning, and identify classification, regression and clustering tasks
A focused answer to the H2 Computing outcome on types of machine learning. Supervised learning with labelled data (classification and regression), unsupervised learning with unlabelled data (clustering), reinforcement learning, and matching a task to a type.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
SEAB wants you to distinguish supervised, unsupervised and reinforcement learning, and to identify whether a task is classification, regression or clustering. The central idea is that the type of learning depends on the data you have and the goal: labelled data for prediction (supervised), unlabelled data for finding structure (unsupervised), or learning from rewards through interaction (reinforcement).
The answer
Supervised learning
Supervised learning uses labelled data: every training example has a known correct output. The model learns to map inputs (features) to those outputs, then predicts the output for new data. It splits into two task types:
- Classification - predicts a discrete category from a fixed set (spam or not; digit 0 to 9; benign or malignant).
- Regression - predicts a continuous numeric value (a house price; tomorrow's temperature).
The difference is the output: a category for classification, a number for regression.
Unsupervised learning
Unsupervised learning uses unlabelled data - no given outputs. The model finds structure or patterns in the data itself. The main task type is:
- Clustering - grouping similar data points together, where the groups are not predefined (segmenting customers by behaviour; grouping similar documents).
There is no "correct answer" to predict; the goal is to discover how the data is organised.
Reinforcement learning
Reinforcement learning trains an agent to make a sequence of decisions by interacting with an environment. The agent takes actions, receives rewards or penalties, and learns a strategy that maximises total reward over time. Unlike supervised learning, there are no labelled correct answers - the agent learns from the consequences of its actions through trial and error (used in game-playing and robotics).
Matching a task to a type
| Task | Type | Learning |
|---|---|---|
| Spam or not spam | Classification | Supervised |
| Predict a price or temperature | Regression | Supervised |
| Group customers, no labels | Clustering | Unsupervised |
| Learn to play a game via rewards | (control) | Reinforcement |
The presence and nature of labels is the deciding question: labelled outputs to predict means supervised, no labels means unsupervised, learning from rewards means reinforcement.
Examples in context
Example 1. Medical imaging triage. Classifying scans as showing a tumour or not is supervised classification, trained on images labelled by radiologists. Predicting a numeric risk percentage instead would be regression. The same images support different tasks depending on whether the target output is a category or a number.
Example 2. Customer segmentation for marketing. A retailer with no predefined customer types uses clustering to discover natural groups - bargain hunters, loyal regulars, occasional big spenders - from purchase data. Because no labels are supplied, this is unsupervised: the value is in revealing structure the business did not already know.
Try this
Q1. State the difference in the data used by supervised and unsupervised learning. [2 marks]
- Cue. Supervised uses labelled data (known correct outputs); unsupervised uses unlabelled data and finds structure itself.
Q2. Is predicting next month's rainfall in millimetres classification or regression? Explain. [2 marks]
- Cue. Regression - the output is a continuous numeric value, not a discrete category.
Q3. How does reinforcement learning differ from supervised learning? [1 mark]
- Cue. It has no labelled correct answers; an agent learns from rewards earned by interacting with an environment through trial and error.
Exam-style practice questions
Practice questions written in the style of SEAB exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
Original6 marks(a) Distinguish between supervised and unsupervised learning in terms of the data used. (b) For each of the following, state whether it is classification, regression or clustering: (i) predicting tomorrow's temperature in degrees; (ii) deciding whether an email is spam or not; (iii) grouping customers by similar buying behaviour with no predefined groups.Show worked answer →
(a) Supervised learning uses labelled data - each training example has a known correct output - and the model learns to predict that output. Unsupervised learning uses unlabelled data - there are no given outputs - and the model finds structure or patterns in the data itself.
(b) Classifying each task:
- (i) Predicting tomorrow's temperature (a continuous numeric value): regression (supervised).
- (ii) Deciding spam or not (a discrete category): classification (supervised).
- (iii) Grouping customers with no predefined groups: clustering (unsupervised).
Markers reward the labelled-versus-unlabelled distinction, and correctly identifying regression (continuous prediction), classification (discrete categories) and clustering (finding groups without labels).
Original5 marks(a) Explain the difference between classification and regression, giving an example of each. (b) Briefly describe reinforcement learning and how it differs from supervised learning.Show worked answer →
(a) Both are supervised tasks, but they differ in output type. Classification predicts a discrete category (a label from a fixed set) - for example, classifying a tumour image as benign or malignant, or recognising a handwritten digit 0 to 9. Regression predicts a continuous numeric value - for example, predicting a house price or a temperature.
(b) Reinforcement learning trains an agent to make a sequence of decisions by interacting with an environment, receiving rewards (or penalties) for its actions and learning a strategy that maximises total reward over time. It differs from supervised learning in that there are no labelled correct answers given; instead the agent learns from the consequences (rewards) of its own actions through trial and error.
Markers reward classification (discrete category) versus regression (continuous value) with valid examples, and reinforcement learning as an agent learning from rewards through interaction, without labelled examples.
Related dot points
- Explain what machine learning is, how a model learns from training data, and how it differs from rule-based programming
A focused answer to the H2 Computing outcome on machine learning fundamentals. Learning a model from data rather than coding explicit rules, training and inference, features and labels, and the role of data quality.
- Describe an artificial neural network in terms of neurons, weights and layers, and explain how training adjusts weights
A focused answer to the H2 Computing outcome on neural networks. Artificial neurons with weighted inputs and an activation function, input, hidden and output layers, how training adjusts weights to reduce error, and what deep learning adds.
- Discuss the ethical and societal impacts of AI and automation, including bias, accountability, privacy and the effect on work
A focused answer to the H2 Computing outcome on AI ethics. Algorithmic bias, accountability and transparency, privacy and data use, the effect of automation on employment, and responsible approaches.
- Describe a hash table and hash function, explain collision resolution by chaining and open addressing, and analyse the effect of load factor
A focused answer to the H2 Computing outcome on hash tables. Hash functions mapping keys to buckets, average O(1) lookup, collisions resolved by chaining or open addressing, and how the load factor affects performance.
- Design test cases using normal, boundary and erroneous data, distinguish levels of testing, and apply systematic debugging techniques
A focused answer to the H2 Computing outcome on testing and debugging. Choosing normal, boundary and erroneous test data, unit and integration and system testing, black-box versus white-box, and systematic debugging.