We created the layers of our model.
Now let's compile this model.
Compiling means preparing the model for training by specifying how to optimize the model by the optimizer,
how to measure performance, the loss function, and what metrics to track during training.
Which are the metrics.
Okay, so in order to compile it, we're going to use the same function inside the same function here
compiling the model model dot compile.
And we have the optimizer Adam Adam.
Not a name of a friend.
It's adaptive.
Moment estimation is a popular optimization algorithm combining benefits of two other methods Adagrad
and Rmsprop.
Don't worry, you're not going to use them.
Automatically adjusts learning rates for each parameter, and it's good default choice for most problems.
The loss function here We talked about it.
Mean squared error standard for regression problems.
Calculates or calculated as average of true values minus predictions.
Square.
So true true values minus predictions squared.
Get.
The average of these values heavily penalizes large errors due to squaring, and works well when you
want to predict continuous values.
And the metrics that we need are the Em and MSE.
The mean absolute error.
Additional performance metric calculated as average of absolute value of true values minus predictions.
So if you remember, we talked about those metrics in the previous videos and in the introductory section.
So please go back if you want to learn more about them.
But don't worry it's very simple.
Um formula.
So MSE mean squared error average of true values minus prediction squared May mean absolute error.
Average of the absolute value of true values minus predictions.
It's very, very simple.
The less sensitive to outliers than MSE.
Easier to interpret than MSE.
Same units as target values during training.
Adam, our friend Adam will adjust weights to minimize MSE.
You'll see both loss MSE and Ma in training logs.
Lower values for both indicate better performance.
This configuration is ideal for predicting continuous numerical values like prices, temperatures,
or any quantity where the output is not categorical.
The main point you point.
You need to understand that as MSE and Ma get lower values, this indicates that we have a better performance
for our model.