MACHINE LEARNING • LESSON 4

Training Data

Training data is the part of a dataset that a machine learning model uses to learn patterns. The model studies these examples and uses what it learns to make predictions on new data.

THE CORE IDEA

Training data is what the model learns from.

Just like a student learns by studying examples, a machine learning model learns by studying training examples. The model looks for useful patterns in the training data rather than being given a list of rules for every possible situation.

01

What Is Training Data?

Training data is the portion of the available dataset that is given to the machine learning algorithm during training.

The model uses these examples to learn relationships between the information it receives and the expected result.

TRAINING DATA Examples
MODEL Learns patterns

The important point is that the model does not simply store one answer. It tries to learn patterns that can help it make predictions later.

02

Example: Learning House Prices

Suppose we want to build a model that predicts the price of a house.

We have information about houses that were already sold.

House Size Bedrooms Location Actual Price
1,200 sq ft 2 City A $250,000
1,800 sq ft 3 City A $350,000
2,200 sq ft 4 City B $450,000
2,500 sq ft 4 City B $520,000

During training, the model studies examples like these.

It can learn that house size, number of bedrooms, location, and other useful information are related to house prices.

Simple idea:

The examples show the model both the input information and, in supervised learning, the correct result it should learn to predict.

03

What Does the Model Learn?

The model looks at many training examples and tries to find patterns in them.

For example, after seeing many house records, a model might learn that larger houses often have higher prices.

EXAMPLES Many houses

Different sizes, locations, bedrooms, and prices.

PATTERN Relationships in the data

The model identifies useful relationships between the inputs and results.

The model then uses these learned patterns when it receives a new house that it has not seen before.

04

Training Data Is Like Practice

A simple way to understand training data is to compare it with practice questions for a student.

STUDENT Practice questions

The student studies examples to learn the subject.

MACHINE LEARNING Training examples

The model studies examples to learn useful patterns.

But there is an important difference: a good ML model should not simply memorize its training examples.

It should learn patterns that can also work on new data.

05

What Happens During Training?

During training, the algorithm repeatedly looks at training examples and adjusts the model so that its predictions become more useful.

INPUT Training example
MODEL Makes a prediction
COMPARE Compare with expected result
LEARN Adjust and improve

This process happens across many training examples. Over time, the model learns parameters that help it make better predictions.

06

More Training Data Is Not Always Automatically Better

It is tempting to think that giving the model more data will always solve the problem.

More useful and relevant data can help, but poor-quality data can still cause problems.

GOOD TRAINING DATA Relevant and useful examples

The data represents the problem the model needs to solve.

POOR TRAINING DATA Incorrect or misleading examples

More bad examples do not automatically create a better model.

The quality, relevance, and variety of training examples matter—not just the number of examples.

07

Training Data Should Represent the Real Problem

Suppose we build a model to identify whether an email is spam.

If the training data contains only emails from one particular type of sender, the model may struggle when it receives very different emails in the real world.

TRAINING DATA Limited examples

The model learns from a narrow view of the problem.

REAL WORLD Many different examples

The model must handle situations it may not have seen exactly during training.

Good training data should provide a useful representation of the situations the model is expected to handle.

KEY IDEA

Training Data Is the Learning Material for the Model.

The model studies training examples, identifies useful patterns, and adjusts itself so it can make predictions later. Good training data should be relevant, useful, and representative of the problem.

QUICK CHECK

What Is Training Data?

You want to build a model that predicts house prices. You have records of 10,000 previously sold houses.

You give 8,000 of those records to the model so it can learn relationships between house features and prices.

Answer

Those 8,000 records are being used as training data.

The model uses them to learn patterns that can later help it predict the prices of houses it has not seen before.

NEXT TOPIC

Validation Data

Training data teaches the model. Next, we will learn about validation data and why we need a separate set of examples when developing and improving a model.