What Happens When Data Changes?
In the previous exercise, we changed the training data and saw that the prediction could change. Now let's understand why.
Usually not. A Machine Learning model learns from data, so changing important training examples can change what the model learns.
Start With Our Original Data
Our simple example started with these training examples:
From these examples, our program calculates a simple relationship between house size and price.
Change One Training Value
Suppose the price of the 1,200 sq ft house changes from $500,000 to $600,000.
$500,000
$600,000
We have not changed the house size. We changed only the known price.
Because our program calculates its relationship from this data, the calculated value can change.
The Learned Relationship Can Change
Remember this line from our Python program:
price_per_sqft = sum(prices) / sum(sizes)
If the values inside prices change,
the result of this calculation can also change.
What If We Add More Training Data?
Suppose we add another example:
Our program now has more information from which to calculate its relationship.
sizes = [800, 1000, 1200, 1500, 1800]
prices = [300000, 400000, 500000, 650000, 750000]
The calculated relationship can therefore be different from the one obtained from the original four examples.
The Interesting Part: Same Input, Different Result
Suppose we ask the program to predict the price of a 1,400 sq ft house.
The input did not change. The training data changed.
Real-World Example: House Prices
Imagine a house-price model trained several years ago.
The housing market changes over time. New houses are sold at different prices.
If the relationship in the real world changes significantly, the old model may no longer perform as well on new data.
Does More Data Always Make the Model Better?
No.
More data can be useful, but the quality and relevance of the data matter.
Examples that represent the real problem accurately can help the model learn useful patterns.
Incorrect, misleading, or irrelevant data can cause problems.
Changing Input vs Changing Training Data
The trained relationship stays the same, but we ask it about different data.
A new training process can produce a different learned relationship.
What Happens When New Data Arrives?
In a real Machine Learning system, simply collecting new data does not automatically mean the existing model has learned from it.
New data and a new prediction are not the same thing. A model needs an appropriate training or updating process to learn from new data.
Two Simple Examples
If new spam patterns appear, updating the training data can help a model adapt to those patterns.
If market conditions change, newer housing data may be needed to keep the model useful.
Common Beginner Confusion
Not necessarily. Prediction and training are separate processes.
No. The new example could be inaccurate or unrepresentative.
Yes, if the trained model or its learned parameters have changed.
Models learn from data, so the data matters.
Change the training data and what the model learns can change. Change the input and the prediction can change. These are two different things.