Skip to content
Back to course

7.3 Training vs Testing Data

When building an ML model, we split our data into at least two parts. The training set is what the model learns from. The testing set is kept hidden during training and used only at the end to measure how well the model performs on data it has never seen.

CollectCleanAnalyseInsight
Data is split into training and testing sets before it flows into the model.

Think of a student preparing for an exam. The practice questions are like training data. The actual exam, with new questions, is like the testing data — it shows whether the student truly learned the concepts or just memorised the practice sheet.

Scenario

Your model scores 99% on the training data but only 62% on the testing data. What is the most likely problem?

Check your understanding

1/4 · 40 XP

What is the testing set used for?