What Did We Learn?
Before moving to the next lesson, let's put everything we learned together into one simple picture.
If you can explain how examples are used to learn a relationship and how that relationship is used to make predictions, you understand the core idea of this lesson.
What Is Machine Learning?
Machine Learning is a way of building systems that learn useful patterns or relationships from data and use what they learned to make predictions or decisions.
Traditional Programming vs Machine Learning
The programmer explicitly writes the rules used to produce the result.
An algorithm learns useful patterns from examples and uses them to produce results.
Our House Price Problem
We wanted to estimate the price of a house based on its size.
Training Data
We started with examples that already had known answers.
We had several such examples. These examples provided the information used to calculate our simple relationship.
What Is a Model?
A model is the learned representation of a relationship or pattern that can be used to produce predictions or decisions.
The model is what we use later when we want to make predictions for new inputs.
Training vs Prediction
The system uses examples to learn a useful relationship or pattern.
The trained model receives new input and produces an output.
What Happens When Data Changes?
We experimented with changing the training data. This can change what the model learns and therefore can change future predictions.
A Model Can Only Use the Information It Has
Our simple model only knew about house size.
It did not know the location, number of bedrooms, age of the house, or any other information.
This idea becomes extremely important when we learn about features later in the course.
What Did We Do With Python?
sizes = [800, 1000, 1200, 1500]
prices = [300000, 400000, 500000, 650000]
price_per_sqft = sum(prices) / sum(sizes)
new_house_size = 1400
predicted_price = new_house_size * price_per_sqft
print("Predicted price:", predicted_price)
The code demonstrated the basic workflow:
Machine Learning in One Diagram
Examples
Find patterns
Learned relationship
Unseen example
Output
Can You Answer These?
Data and examples.
A learned representation of useful patterns or relationships that can be used for predictions or decisions.
The process of learning from training data.
Using the trained model with new input to produce an output.
What the model learns can change, which can affect future predictions.
Machine Learning learns useful patterns from data and uses what it learned to make predictions or decisions.
Everything we built in this lesson was designed to make this single idea concrete.