What is machine learning?
Machine learning (ML) is a branch of artificial intelligence that builds models from data. Instead of writing a separate instruction for every possible case, a system identifies useful patterns and uses them to make predictions or decisions about new information.
Cambridge syllabus focus
Topic 6.4 introduces AI and machine learning. The key idea in the supplied FutureLogic lesson is that a system uses data and results to adapt its future behaviour. Supervised and unsupervised learning are included as two approaches. This article adds explanatory examples to make those concepts easier to understand.
How does a machine learning system learn?
- Collect data: obtain relevant examples, such as images or previous searches.
- Identify patterns: use a learning algorithm to discover relationships in the examples.
- Build or adjust a model: change internal parameters based on the data.
- Test on new examples: check whether the model works beyond the training data.
- Improve where appropriate: update or retrain the model using suitable new data and evaluation.
New input β Trained model β Prediction
Important distinction: a trained model does not necessarily change every time it is used. Some systems are retrained periodically; others can update as new data arrives.
What is supervised learning?
In supervised learning, the training examples include labels or known answers. The system learns a relationship between each input and its expected output, then uses that relationship on unfamiliar inputs.
Worked example β identifying spam emails
A training set contains emails labelled spam or not spam. The model learns patterns associated with those labels. When a new email arrives, it predicts which category it belongs to.
New email β Model β Predicted label
Why is this supervised?
Because the training examples include the correct categories, allowing the model to learn from labelled data.
What is unsupervised learning?
In unsupervised learning, the system receives data without predefined answer labels. It searches for structure, similarities or groups within that data.
Worked example β grouping shopping behaviour
A shop analyses customers' purchase patterns without assigning each customer a category in advance. An unsupervised algorithm may group customers with similar purchasing habits.
Why is this unsupervised?
Because the algorithm identifies groups without being supplied with a correct group label for each training example.
Supervised and unsupervised learning compared
| Feature | Supervised | Unsupervised |
|---|---|---|
| Training data | Labelled examples | Unlabelled examples |
| Main goal | Predict a known target | Discover patterns or groups |
| Example | Classify spam | Group similar customers |
| Known answers during training? | Yes | No predefined target labels |
How do results help a model improve?
Some learning systems use the difference between a prediction and a known answer to adjust the model during training. For example, if a labelled image of a cat is incorrectly predicted as a dog, training can use that error to update the model. Over many examples, the model may become more accurate.
For unsupervised learning, there may be no single correct label to compare against. The system instead optimises an objective such as grouping similar data points together. Not all machine learning relies on a success/failure signal in the same way.
Check your understanding
A system is trained using photos labelled βcatβ and βdogβ. Which approach is used?
Reveal answer
Supervised learning. The training images have known labels.
Machine learning in a search engine
A search engine may analyse previous searches, selected results and other relevance signals to train or improve ranking models. When a similar search occurs, a model can help estimate which results are most relevant. A click is only one possible signal; it does not automatically mean the selected page was correct or useful.
Limitations and risks
- Biased data: unrepresentative training examples can produce unfair or inaccurate predictions.
- Poor-quality data: missing or incorrect examples may reduce accuracy.
- Overfitting: a model can perform well on training examples but poorly on new data.
- Privacy: collecting personal information requires appropriate safeguards.
- No guaranteed correctness: predictions can still be wrong, even after training.
Common exam mistakes
Better: it learns patterns from data and uses a trained model to make predictions or decisions.
Both approaches use algorithms; the difference is whether training examples have known target labels.
Using a model does not necessarily update it. Explain how training or retraining takes place.
Name the data collected and the specific prediction or decision that improves.
Original FutureLogic exam-style practice
Original educational questions, not official Cambridge examination questions. Suggested marks are indicative.
Question 1 β 2 marks
Describe machine learning.
Reveal model answer
A system identifies patterns in data (1) and uses them to improve predictions or decisions on new examples (1).
Question 2 β 2 marks
Explain why a model trained with images labelled βappleβ and βbananaβ uses supervised learning.
Reveal model answer
Each training image is supplied with its correct category (1), so the model can learn to predict those categories for new images (1).
Question 3 β 3 marks
Describe how a retailer might use unsupervised learning.
Reveal model answer
The retailer collects purchase data without predefined customer-group labels (1). The algorithm identifies similarities in buying patterns (1) and groups customers with similar behaviour (1).
Question 4 β 3 marks
Explain how machine learning could improve search result ranking.
Reveal model answer
The system analyses previous search queries and relevance signals (1), identifies patterns associated with useful results (1) and uses a trained model to rank results for future searches (1).
Quick quiz
- What is training data?
- What makes supervised learning different?
- What can unsupervised learning discover?
- Does a trained model always update after every prediction?
- Why is data quality important?
Quiz answers
Reveal all answers
- Examples used to train a model.
- It uses known labels or targets.
- Patterns, similarities or groups.
- No; updating depends on the system.
- Poor data can lead to inaccurate or biased results.
Final summary
Machine learning
Builds models from data.
Supervised
Uses labelled examples.
Unsupervised
Finds patterns in unlabelled data.
Evaluation
Checks performance on new examples.