Training and testing
Why AI is trained on one set of examples and tested on another, what accuracy means, and how models get better.
How do we know if an AI has learned well? We train it, then test it.
Training and testing
Training data is the set of examples the A I learns from. It's like studying for an exam. Test data is a separate set of new examples it has never seen. It's like the exam itself. Imagine a student who memorised last year's exam answers. They'd do well on the same questions, but struggle with new ones. A I is the same. We test it on new examples, to check that it really learned the pattern, and didn't just memorise.
Train, test, improve
First, collect labelled data. Second, train the model on most of it. Third, test it on examples it hasn't seen. And fourth, improve it, by adding more data or fixing labels, then test again.
New word: Accuracy
Accuracy is how often the A I's predictions are right, usually given as a percentage. If it gets ninety out of one hundred test photos right, its accuracy is ninety percent.
Quick check
Quick check. Why test an A I on data it hasn't seen before? To check that it really learned the pattern, and didn't just memorise the examples. Options: To check it learned the pattern, not just memorised; To make it slower; To delete the training data; Testing isn't needed.
Recap
Train on one set of examples. Test on new examples. Accuracy shows how often it's right. Then improve it, and test again.
Key points
- Training data is what the AI learns from. Test data is a separate set of new examples used to check it.
- Testing on new data shows whether the AI learned the pattern or just memorised the examples.
- Accuracy is the percentage of predictions that are right. 90 right out of 100 is 90% accuracy.
- Building AI is a cycle: collect, train, test, improve, and test again.
Try it: Train and test
Choose the best answer.