Search the courses, subjects, tracks, games and features, or jump straight to a page.
Learn it your way
A short class with Sarah and her students. The other ways are under More.
Sign up free to listen. Transcripts are free to read.
Today, we will learn about making predictions with our linear regression model. Can anyone explain what we mean by 'making predictions' using a model?
Is it when we use our model to estimate values that it hasn’t seen before?
Exactly, Student_1! We will input new values, such as years of experience, and the model will output predicted salaries. This process is crucial for decision-making in real-world scenarios.
What kind of data do we need to make these predictions?
Great question! We need to provide the model with new feature data, like the years of experience, to generate our predictions.
Let's summarize: Making predictions involves inputting new data into our trained model to get estimated outputs. Can anyone remember the equation we used in linear regression?
Now, let’s make a prediction for a person with 6 years of experience! What would be our input?
We would input '6' for years of experience, right?
Correct, Student_3! Let's use the trained model. The predicted salary would be calculated using the linear regression equation. Who remembers what that equation looked like?
It was Salary = m * Experience + c, right?
Right again! Now with our trained model, we can execute the prediction code: predicted_salary = model.predict([[6]]). What do you think that will give us?
It will give us the predicted salary for someone with 6 years of experience!
Exactly! Once we run that code, we will get a numerical result. This is our model in action!
Let’s summarize: To predict, we input new feature values into our model and receive an output, which in our case is the predicted salary.
After predicting the salary for 6 years of experience, why is it important to understand what this number means?
I think it helps us understand if the estimate makes sense or not, right?
Exactly, Student_3. You might compare it to industry standards or use it for salary negotiations. Understanding the output puts the prediction into context!
And it could help us see how accurate our model is by comparing predictions to real salaries!
Good observation! Evaluating the performance of our model is vital, which leads us to the next section where we assess how well it performs predictions.
To summarize, predictions are not just numbers; they need to be interpreted within context.
The process of inputting new feature values into a trained model to yield estimated outputs.
The output of a model after making a prediction based on input data.
The process of configuring an algorithm with known data inputs and outputs.
If you want a salary and have years to say, input them to the model, that's the only way!
Imagine a wise old owl who predicts the future. He takes the years of experience and whispers the expected salary, guiding those to make smart career choices.
To remember prediction steps, think: 'Input, Output, Evaluate' (IOE).
PEER: Predict, Evaluate, Execute, Reflect - steps to making predictions.
Term
What is the core function of a prediction model?
Click to flip
Term
What value do we predict with linear regression?
Click to flip
The expected output from the model based on input feature values.
A supervised learning algorithm that models the relationship between independent variables and a dependent outcome using a straight line.
A mathematical representation used in machine learning to make predictions based on input data.
This section discusses how to use the linear regression model to make predictions based on input features.
In this section, we explore the practical application of linear regression by making predictions based on trained models. We specifically demonstrate predicting salary for a given number of years of experience using a trained linear regression model.
In this section, we focus on utilizing the linear regression model to make predictions. A core capability of any supervised learning model, such as the linear regression model we implemented, is to extrapolate data points based on learned relationships. By the end of this section, you will understand how to input new feature values into a trained model to receive predictions.
This process underpins how linear regression achieves its goal of providing a mechanism to estimate and forecast values based on trends observed in the training data.