MACHINE LEARNING • LESSON 4

A Simple Dataset Split

We now know why training, validation, and test data have different jobs. The next step is to see how one dataset can actually be divided into these three parts.

THE CORE IDEA

One dataset can be divided into separate portions for different purposes.

A common simple example is to divide the data into training, validation, and test sets. For example, we might use 80% for training, 10% for validation, and 10% for testing.

01

Start With One Dataset

Imagine that we have collected information about 10,000 houses.

Each house has information such as its size, number of bedrooms, location, and actual selling price.

ORIGINAL DATASET 10,000 House Records

All the data we collected for our machine learning problem.

We do not want to use all 10,000 records for training. We need to keep some records aside so we can evaluate the model later.

02

Split the Dataset

For this example, let's use a simple 80 / 10 / 10 split.

TRAINING • 80% 8,000 houses

Used to teach the model.

VALIDATION • 10% 1,000 houses

Used during development to compare and improve the model.

TEST • 10% 1,000 houses

Kept aside for the final evaluation.

Notice that the three portions together still contain all 10,000 records.

03

What Happens to Each Part?

Each portion now has a different job.

8,000 HOUSES Training

The model learns patterns from these examples.

1,000 HOUSES Validation

We compare model choices and make development decisions.

1,000 HOUSES Test

We use these examples for the final evaluation.

04

Why Not Use 90% for Training?

You might wonder why we don't simply give the model more training data.

More training data can be useful, but we still need separate data to help us make development decisions and evaluate the finished model.

TRAINING More data to learn
+
VALIDATION Data for development decisions
+
TEST Data for final evaluation

We need to balance these purposes rather than giving everything to training.

05

The Split Is Not Always 80 / 10 / 10

The 80 / 10 / 10 example is useful for understanding the idea, but it is not a universal rule.

The appropriate split depends on things such as the amount of available data, the type of problem, and the machine learning workflow being used.

Don't memorize 80 / 10 / 10 as the "correct" split.

Understand the purpose of each portion first. The actual proportions can change depending on the project.

06

Another Simple Example

Imagine we have 1,000 customer records and want to build a model that predicts whether a customer will buy a product.

TRAINING 800 customers

Learn patterns from previous customer behavior.

VALIDATION 100 customers

Compare and improve model choices.

TEST 100 customers

Perform the final evaluation.

The numbers are different from the house example, but the idea is exactly the same.

07

The Important Part Is the Purpose

Don't focus too much on the exact percentage. Focus on why each portion exists.

DATA JOB
Training Learn patterns
Validation Guide model development
Test Final evaluation
08

What Happens After the Split?

Once the data has been separated, we can begin the machine learning process.

STEP 1 Train Learn from training data.
STEP 2 Validate Compare and improve choices.
STEP 3 Test Evaluate the finished model.

This gives each portion of the dataset a clear role instead of using the same examples for everything.

KEY IDEA

Split the Data Based on Purpose.

A simple example is 80% training, 10% validation, and 10% test. The exact percentages can change, but the important idea is that different data is reserved for learning, development decisions, and final evaluation.

QUICK CHECK

Let's Split 10,000 Records

Suppose you have 10,000 customer records and use an 80 / 10 / 10 split.

How many records go into training?

8,000 records

80% of 10,000 = 8,000.

How many records go into validation?

1,000 records

10% of 10,000 = 1,000.

How many records go into testing?

1,000 records

10% of 10,000 = 1,000.

NEXT TOPIC

Putting the Data Split Together

Now that we understand how a simple split works, we will put the complete training, validation, and test process together and see how the three parts work as one workflow.