Machine learning: learning from examples
Machine learning is a way of making AI where the computer learns from many examples instead of being given every rule. Examples often have labels (the right answers) and features (the details the computer looks at).
📌 Key points
- Machine learning means a computer learns from examples and gets better at a task.
- Programmers do not write every rule. They give the computer lots of examples and a way to learn from them.
- A label is the right answer for an example, such as "cat" or "dog", or "spam" or "not spam".
- A feature is a detail the computer can look at, such as size, colour, shape or number of legs.
- The computer works out which features go with which labels. What it learns is called a model.
- The model can then make predictions about new examples it has never seen.
- Many apps use machine learning: spam filters, photo apps, voice assistants and translation apps.
📖 Key words
- Machine learning
- A way of making AI where the computer learns from examples instead of being given every rule.
- Example
- One item the computer learns from, such as one photo or one email.
- Label
- The right answer for an example, such as "cat" or "spam".
- Feature
- A detail the computer looks at, such as colour, size or shape.
- Model
- What the computer has learned, which it uses to make predictions.
✏️ Worked example
How could a computer learn to tell apples from bananas?
- Collect examples: 100 pieces of fruit, each with a label, "apple" or "banana".
- Choose features to look at: colour, shape (round or long) and length.
- The computer studies all the examples and finds a pattern: long and curved usually means banana; round usually means apple.
- Now it sees a new fruit that is round and red. It predicts "apple".
- Answer: labels give the right answers, features give the details, and the model links them together.
Remember: label = the answer, feature = a clue. The computer learns which clues lead to which answer.
Test yourself8 questions from a bank of 20. A new mix every time.
Start the quiz →