AI Lab › Explainer
What is machine learning?
In machine learning, instead of writing rules by hand, you show a computer lots of examples and let it find the pattern on its own.
Rules versus examples
Imagine writing rules to spot spam: "if it has more than three links, it is spam". Spammers would quickly work around that. With machine learning you instead give the computer thousands of emails already marked "spam" or "not spam", and it works out what spam tends to look like.
The main parts
- Training data. The examples the model learns from. Each has features (things you can measure, like number of links) and often a label (the right answer, like "spam").
- Model. The pattern the computer learns.
- Prediction. The model's answer for a new example it has not seen.
- Test data. Examples kept aside to check how well the model really does.
Good data matters most
A model is only as good as its examples. It can be fooled if the examples are too few, leave out important cases, or contain mistakes. A model trained mostly on small dogs may fail on big ones. A model trained on wrongly labelled examples learns the wrong lessons. People often say "garbage in, garbage out".
Learning too well
A model can also memorise its training examples, including their quirks, and then do badly on new ones. Testing on examples it has never seen is how you catch this.
Where you meet it
Spam filters, recommendations on video and music apps, photo apps that find faces, and voice assistants all use machine learning. Chatbots use a very large version of the same idea.
Talk about it
- Why do you need test examples the model has not seen?
- If a model gets worse after you add more data, what might have gone wrong with the data?
Words to know
- Training data
- Examples a model learns from.
- Label
- The correct answer attached to an example, such as "spam".
- Overfitting
- When a model memorises its training examples and does poorly on new ones.