Course Content

# Introduction to Neural Networks

Introduction to Neural Networks

## Model Training and Evaluation

## Metrics

The main goal of training a neural network is to **reduce the error** between model predictions and real data. To determine how well the model is doing its job, we need to somehow **measure this error**. This is the "quality of the model".

There are many different ways to calculate the quality of a model, and which method you choose depends on the problem you are trying to solve:

**Accuracy**is simply the percentage of correct answers from all answers. For example, if your model correctly classified 90 out of 100 images, the accuracy would be 90%.**Mean Squared Error (MSE)**- often used in regression problems. Here we measure how much the model's predictions differ from the true values on average.**Cross-entropy (Cross-entropy)**- often used in classification problems. This is a measure of how well the predicted probabilities match the actual labels.- And many other metrics...

Choosing the right metric is important because it determines how the model will "learn" and what it will consider a "good" result. If you use the **wrong metric**, the model **may not learn the way you expect**.

Our code uses the **accuracy metric**, which is one of the most basic and intuitive quality metrics for classification problems.

Note

You can try experimenting with the

number of epochsandlearning ratebefore submitting the requested values to see how it affects the resulting accuracy. You can also see how increasing the number of epochs affects the time it takes to train the model.

# Task

Get the predictions of the trained model and evaluate the performance of the model using them:

- Training the model with
`100`

epochs and learning rate`0.5`

. - Get predictions of the model for every example in the test set.
- Calculate accuracy of the model.

Everything was clear?