Putting the Data Split Together
We have now learned about training data, validation data, test data, and how a dataset can be split. Let's put everything together and see how the three parts work as one complete process.
Learn → Improve → Final Check
Training data is used to learn patterns. Validation data is used during development to help us make decisions. Test data is kept separate and used at the end to evaluate the finished model.
Start With the Complete Dataset
Imagine that we want to build a machine learning model that predicts whether a customer will buy a product.
We have collected information about 10,000 customers.
Each record contains information that can help the model understand customer behavior.
We don't use all 10,000 records for training. We first separate the dataset into different portions.
Split the Dataset
For this example, let's use the simple 80 / 10 / 10 split we learned earlier.
Used to teach the model.
Used during development.
Kept aside for the final evaluation.
Now each part has a clear purpose.
Step 1 — Train the Model
We start with the training data.
The model looks at the 8,000 training examples and learns patterns that connect customer information with whether the customer purchased the product.
At this point, the model has learned from the training examples.
Step 2 — Check With Validation Data
Next, we use the validation data to see how the current model performs during development.
We can use the validation results to compare different models or settings and decide what should be improved.
For example, suppose Model A has 85% validation accuracy and Model B has 92%. We may choose Model B for further development.
Step 3 — Final Test
After we finish developing the model and making our decisions, we use the test data.
The 1,000 test records were kept separate from the development process.
This gives us a final measurement of how the finished model performs on data that was kept separate.
One Complete Example
Let's put the entire customer-purchase example together.
Model learns customer behavior patterns.
We compare and improve the model.
We perform the final evaluation.
What Happens If the Model Performs Poorly?
Suppose the final test result is worse than expected.
We should not simply keep changing the model based on the test result again and again. That would turn the test set into part of the development process.
Model development should primarily use the training and validation process. The test set is intended for the final evaluation.
This is why keeping the test data separate is important.
The Whole Process in One Picture
Each Data Split Has One Main Job.
Training data teaches the model. Validation data helps us develop and choose the model. Test data is kept separate and used for the final evaluation.
Remember the Three Questions
You Now Understand the Data Split.
You know why datasets are split, what training, validation, and test data mean, how a simple split works, and how the three parts work together during machine learning.