WEBVTT

00:00.120 --> 00:03.360
We created the layers of our model.

00:03.400 --> 00:05.680
Now let's compile this model.

00:05.680 --> 00:13.400
Compiling means preparing the model for training by specifying how to optimize the model by the optimizer,

00:13.600 --> 00:19.840
how to measure performance, the loss function, and what metrics to track during training.

00:20.080 --> 00:21.560
Which are the metrics.

00:21.680 --> 00:30.720
Okay, so in order to compile it, we're going to use the same function inside the same function here

00:30.760 --> 00:34.360
compiling the model model dot compile.

00:34.520 --> 00:39.640
And we have the optimizer Adam Adam.

00:40.720 --> 00:43.040
Not a name of a friend.

00:43.160 --> 00:44.760
It's adaptive.

00:44.760 --> 00:53.880
Moment estimation is a popular optimization algorithm combining benefits of two other methods Adagrad

00:53.880 --> 00:56.000
and Rmsprop.

00:56.040 --> 00:58.840
Don't worry, you're not going to use them.

00:58.880 --> 01:07.880
Automatically adjusts learning rates for each parameter, and it's good default choice for most problems.

01:08.080 --> 01:12.980
The loss function here We talked about it.

01:13.020 --> 01:17.700
Mean squared error standard for regression problems.

01:17.820 --> 01:24.540
Calculates or calculated as average of true values minus predictions.

01:24.540 --> 01:25.340
Square.

01:25.540 --> 01:29.260
So true true values minus predictions squared.

01:29.300 --> 01:29.620
Get.

01:29.620 --> 01:39.140
The average of these values heavily penalizes large errors due to squaring, and works well when you

01:39.140 --> 01:41.820
want to predict continuous values.

01:41.980 --> 01:47.940
And the metrics that we need are the Em and MSE.

01:48.300 --> 01:50.140
The mean absolute error.

01:50.140 --> 01:58.460
Additional performance metric calculated as average of absolute value of true values minus predictions.

01:58.500 --> 02:05.660
So if you remember, we talked about those metrics in the previous videos and in the introductory section.

02:05.660 --> 02:09.460
So please go back if you want to learn more about them.

02:09.460 --> 02:12.460
But don't worry it's very simple.

02:12.620 --> 02:14.340
Um formula.

02:14.780 --> 02:23.290
So MSE mean squared error average of true values minus prediction squared May mean absolute error.

02:23.330 --> 02:27.210
Average of the absolute value of true values minus predictions.

02:27.210 --> 02:29.530
It's very, very simple.

02:29.970 --> 02:34.970
The less sensitive to outliers than MSE.

02:35.330 --> 02:37.730
Easier to interpret than MSE.

02:37.770 --> 02:41.570
Same units as target values during training.

02:41.930 --> 02:49.050
Adam, our friend Adam will adjust weights to minimize MSE.

02:49.330 --> 02:54.890
You'll see both loss MSE and Ma in training logs.

02:54.930 --> 02:58.930
Lower values for both indicate better performance.

02:59.330 --> 03:06.290
This configuration is ideal for predicting continuous numerical values like prices, temperatures,

03:06.450 --> 03:11.730
or any quantity where the output is not categorical.

03:11.770 --> 03:13.490
The main point you point.

03:13.490 --> 03:23.610
You need to understand that as MSE and Ma get lower values, this indicates that we have a better performance

03:23.610 --> 03:25.050
for our model.
