WEBVTT

00:00.080 --> 00:01.800
We trained our model.

00:01.800 --> 00:04.800
Now let's evaluate the model performance.

00:05.040 --> 00:10.400
Here we're going to create a new cell for plotting the training history.

00:10.400 --> 00:12.640
So plot training history.

00:12.920 --> 00:17.920
I'll start with a variable called history plot history.

00:17.920 --> 00:23.760
And if we go back to here let me see the train.

00:23.760 --> 00:25.240
The model history.

00:25.440 --> 00:27.880
History is the trained model.

00:27.880 --> 00:33.280
So let me scroll down and pass it to the plot history function.

00:33.320 --> 00:39.200
Here I created a new function called plot history and passed the history as its parameter.

00:39.240 --> 00:39.680
Okay.

00:39.720 --> 00:42.560
Plot training and validation loss values.

00:42.560 --> 00:44.400
Let's start with plt.

00:44.520 --> 00:56.400
As we did before, PLT is used from the library that used for plotting and making diagrams 12 by two

00:56.680 --> 01:03.720
figure size equals Matplot library and plt subplot.

01:03.760 --> 01:10.360
1 to 1 plot historyhistory the last and make the label.

01:10.400 --> 01:12.560
Set the label to training class.

01:12.600 --> 01:15.920
Make another plot for the values.

01:16.080 --> 01:18.680
Make the label for validation loss.

01:18.680 --> 01:21.960
So this is for the validation loss and this is the loss.

01:21.960 --> 01:29.520
And also set the X label to the apex Y label to the loss MSE.

01:29.880 --> 01:31.720
Let's make it here MSE.

01:32.040 --> 01:37.320
Make a legend and a title for this diagram.

01:37.360 --> 01:40.240
Training and validation loss okay.

01:40.400 --> 01:43.600
Also let me create another plot.

01:43.920 --> 01:45.240
This is 1 to 1.

01:45.240 --> 01:49.520
This is the left side for the left left diagram.

01:49.560 --> 01:54.040
We talked about this library a lot in the previous videos.

01:54.040 --> 01:54.520
Guys.

01:54.760 --> 01:55.960
It's very simple.

01:56.000 --> 01:58.440
I'm making x and y axis.

01:58.680 --> 02:00.280
X axis is x.

02:00.680 --> 02:03.800
X and y axis is the loss in MSE.

02:03.800 --> 02:13.680
I am plotting the from the model that I trained called history loss and get the history of the history

02:13.680 --> 02:14.200
model.

02:14.200 --> 02:16.080
Get the loss from it.

02:16.080 --> 02:20.760
Let me print the Ma and see the ma.

02:20.800 --> 02:24.600
So plot subplot take the right diagram.

02:24.640 --> 02:35.880
I get the Ma, make the history, the val, ma and validation ma set the x label to epics y label to

02:35.920 --> 02:37.520
mean absolute error.

02:37.560 --> 02:42.160
Ma get the legend and title for it.

02:42.400 --> 02:42.920
Okay?

02:43.240 --> 02:48.320
Make this plot tight layout and show the plot.

02:48.360 --> 02:51.480
Let me run and call this function plot history.

02:51.520 --> 02:57.520
Let me at first run all we get this error in plot history.

02:57.560 --> 02:58.600
Let me see.

02:58.800 --> 03:01.520
Unknown argument label.

03:01.520 --> 03:02.720
Let me scroll up.

03:02.960 --> 03:03.320
Oops.

03:03.680 --> 03:04.160
Um.

03:04.760 --> 03:05.840
Here the plot.

03:06.040 --> 03:09.720
They a label with a small letter.

03:09.800 --> 03:13.960
So let me see the label y label.

03:14.240 --> 03:19.520
Okay, so there is no argument called capital letter L.

03:19.680 --> 03:20.440
Label.

03:20.480 --> 03:22.040
Small letter L.

03:22.200 --> 03:23.760
Scroll down to here.

03:23.800 --> 03:28.640
Label and label run again and here we go.

03:28.680 --> 03:30.200
Congratulations guys.

03:30.200 --> 03:34.040
This is our training and validation loss plots.

03:34.080 --> 03:39.720
Okay so here we have the validation loss in orange.

03:39.880 --> 03:41.920
The training loss in blue.

03:42.080 --> 03:54.680
If we see for the last MSE as epochs increase the MSE drops down and decrease to around as table one.

03:54.800 --> 04:03.760
And here, if the validation, the validation loss and training loss decreased and stable, then there

04:03.800 --> 04:06.320
is no need to create more epochs.

04:06.600 --> 04:09.400
For this we use the early access.

04:09.680 --> 04:14.840
And by the way this is a good and this is a good visualization.

04:14.840 --> 04:24.600
We uh, we end the previous videos, compared and analyzed the MSA and Maa in the data like those.

04:24.760 --> 04:31.120
But we, uh, we plotted this in order to understand it better.

04:31.160 --> 04:33.240
Also, this is true for the Maa.

04:33.440 --> 04:37.560
As epochs increase, that decreased okay.

04:37.920 --> 04:45.600
This is how we validate the data and how and how to evaluate the model performance.
