MACHINE LEARNING • LESSON 4

Putting the Data Split Together

We have seen training data, validation data, and test data separately. Now let's connect them into one complete Machine Learning workflow.

THE CORE IDEA

One dataset can have three different jobs: learn, choose, and evaluate.

Training data teaches the model. Validation data helps us make development decisions. Test data gives us the final evaluation.

01

Start With the Original Dataset

Imagine we have a dataset containing 10,000 house records.

Each record contains features such as house size, bedrooms, location, age, and the actual selling price.

ORIGINAL DATASET 10,000 Samples

These are all the examples available for the Machine Learning problem.

02

Split the Dataset

For this example, we will use an 80 / 10 / 10 split.

80% Training
10% Validation
10% Test
TRAINING 8,000

Learn

VALIDATION 1,000

Choose

TEST 1,000

Evaluate

03

Step 1 — Train the Model

The first step is to give the training data to the Machine Learning algorithm.

TRAINING DATA 8,000 Samples

The model learns patterns from these examples.

For example, a house-price model may learn how different features relate to the selling price.

04

Step 2 — Validate the Model

After training, we can evaluate the model using the validation data.

VALIDATION DATA 1,000 Samples

Use the results to compare approaches and make development decisions.

For example, suppose we try two different models.

MODEL A 84%

Validation accuracy

MODEL B 91%

Validation accuracy

Based on this validation result, we may choose Model B for the next stage.

05

Step 3 — Final Test

Once we have finished development and selected our final approach, we evaluate it using the test data.

TEST DATA 1,000 Samples

Used for the final evaluation of the selected model.

For example, the final model might achieve 89% accuracy on the test set.

06

The Complete Workflow

01 Original Data

10,000 samples

02 Split

80 / 10 / 10

03 Train

Learn patterns

04 Validate

Choose approach

05 Test

Final evaluation

07

What Happens to the Test Data During Development?

Ideally, nothing.

The test data should stay separate while you are comparing models, changing settings, and improving your approach.

Protect the test set.

If you repeatedly change your model based on test results, the test set is no longer acting as a clean final evaluation.

08

A Bad Workflow

Train Test Change Model Test Again Change Again

This is a problem because the test results are influencing development decisions.

09

A Better Workflow

01 Train
02 Validate
03 Improve
04 Select
05 Test

Development decisions happen before the final test.

10

Do We Always Need Three Splits?

No.

A separate validation set is useful when you need to make repeated development decisions, but simpler projects may use only training and test data.

SIMPLE PROJECT Training + Test

Train the model using one portion and reserve another portion for evaluation.

MORE DEVELOPMENT Training + Validation + Test

Useful when models, parameters, or approaches need to be compared during development.

11

One More Important Point

The split percentage is not the main idea.

An 80 / 10 / 10 split is only an example. Depending on the size, structure, and type of data, different strategies may be more appropriate.

Example 1

A very large dataset may have enough examples for relatively small validation and test portions.

Example 2

A small dataset may require a different evaluation strategy instead of simply removing a large percentage for a fixed test set.

LESSON 4 SUMMARY

Learn → Choose → Evaluate

Training data is used to learn patterns.

Validation data is used during development to compare and improve approaches.

Test data is reserved for the final evaluation.

QUICK CHECK

Final Question

You trained several models and used validation data to select the best approach.

You have not yet evaluated the selected model on the test set.

What should you do next?

Answer

Evaluate the selected final model on the test dataset.

The test result should provide the final estimate of performance on the held-out data.

LESSON 4 COMPLETE

You Now Understand the Data Split

You know why datasets are split, what training, validation, and test data are used for, and how they fit together in a Machine Learning workflow.