WEBVTT

00:00.080 --> 00:01.000
Welcome back.

00:01.040 --> 00:06.640
After we learned about the Mae and MSE and evaluated our model.

00:06.840 --> 00:09.800
Now let's make predictions here.

00:10.040 --> 00:19.520
Start with predictions equals to model predict x test scaled dot flatten.

00:19.560 --> 00:22.560
I need to plot it on diagram.

00:22.560 --> 00:26.920
So let's visualize the predictions versus the actual values.

00:27.080 --> 00:28.360
Plot figure.

00:28.520 --> 00:37.480
We need to create a figure eight by six the scatter y test predictions and alpha 0.5.

00:37.520 --> 00:40.760
We can make it like seven to better understand it.

00:40.920 --> 00:47.600
Also, we talked about those in the previous videos, so please go back to the previous videos in order

00:47.600 --> 00:49.640
to get more data about them.

00:49.640 --> 00:52.040
But they are very, very simple.

00:52.040 --> 00:58.560
We are using the Matplot library by using plt plt, dot figure, dot scatter.

00:58.760 --> 01:04.760
And here let me set the x label and y label the actual mpg.

01:05.040 --> 01:11.000
The y label predicted mpg and the title actual versus predicted mpg.

01:11.160 --> 01:16.000
Also, we need to uh, the plt dot plot.

01:16.040 --> 01:25.240
It is the very important thing y test because we are testing the we are getting the tested once y test

01:25.280 --> 01:32.530
maximum Y test minimum, Y test maximum and k minus minus and L2.

01:32.570 --> 01:33.010
Okay.

01:33.210 --> 01:38.770
Those are very simple for creating the the plot and the graph.

01:38.930 --> 01:41.170
Make it tight layout.

01:41.170 --> 01:44.970
And don't miss to use the show function to show it.

01:45.170 --> 01:48.130
Let's run and here we go.

01:48.370 --> 01:50.330
This is our model.

01:50.370 --> 01:50.930
Okay.

01:51.290 --> 02:01.290
This is our diagram that gives us the actual data and the predicted label, the actual data and the

02:01.290 --> 02:02.610
predicted mpg.

02:02.650 --> 02:06.930
You can see that those points are actual.

02:06.930 --> 02:09.570
And the predicted line is this.

02:09.730 --> 02:12.570
Okay so congratulations guys.

02:12.690 --> 02:15.770
The the line is shown here.

02:16.050 --> 02:19.370
R is close to the points.

02:19.370 --> 02:23.450
And those points are close to the the straight line here.

02:23.730 --> 02:28.810
And this gives us an indication that our model is well trained.

02:29.050 --> 02:33.730
And we get the correct predictions and near predictions.

02:33.730 --> 02:41.330
So this is a very important analysis of the model that it is trained.

02:41.330 --> 02:49.210
And this is a good indication that the data are grouped near the approximately near the straight line.
