Welcome back.
Congratulations guys for this good result for displaying the actual and the predicted prices in this
graph.
So I want from you to try yourself all those steps and get the same results.
Also congratulations guys.
We well trained our model.
Now let's test our model.
We have a new size variable equals to Np.array.
I am generating a new array here and predicted price equals to model dot predict.
I am using our trained model to predict the price for a 2.5 k square feet.
So we're going to test our model with how uh, how much it will cost for 2500ft² house.
So we need to predict 2.5 here on the graph.
2.5.
It's around 9.5.
So you can see here if I make the plot size 2.5 here the plotting it will predict near 9.5.
So let me run this cell predicted the price for a square 2500ft².
house is 9.42 K dollars.
Okay, so here we are predicting the price 9.59.4.
So it's similar to this equation based on the trained model.
Okay.
So congratulations guys.
You've just built your first ML model in Python steps.
We imported libraries.
We create and load data visualize data split into train and test.
As I said to you 80% for training and 20% for testing training the model for linear regression and evaluate
performance.
This is the foundation of most ML workflows.
What we're going to do.
You can try to use real data CSV file upload as we did here.
Try other models random forest SVM and add more features, bedrooms, location and others.
Okay, so you can try it with yourself.
As I told you, the same steps that we've followed.
Okay, so congratulations guys.
We trained and well trained our first ML model.