🎲 Surprise me

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

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.

Try it: 📊 Train the Classifier. A free game that puts these ideas into practice.

Talk about it

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.

More to explore

Teaching this? See the guide for teachers.