Training Data vs Test Data

1 min

We never let the computer study with the same questions as the final exam — that would be cheating!

Imagine it like this: Your teacher gives you 100 practice questions (training data) and then 20 different questions for the real test (test data). That way, your grade really shows whether you understood the subject, not just whether you memorized the flashcard.

Examples:

  • A photo app trains on 8,000 cat/dog pictures, then is tested on 2,000 new ones
  • A spam filter learns from old emails, then is checked on recent emails

So? Splitting the data keeps the computer honest — testing it on things it has never seen tells us whether it really learned, instead of just memorizing.