Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Model Training and Evaluation | Neural Network from Scratch
Introduction to Neural Networks
course content

Зміст курсу

Introduction to Neural Networks

Introduction to Neural Networks

1. Concept of Neural Network
2. Neural Network from Scratch
3. Conclusion

book
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:

  1. 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%;

  2. 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;

  3. Cross-entropy (Cross-entropy) - often used in classification problems. This is a measure of how well the predicted probabilities match the actual labels;

  4. 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 epochs and learning rate before 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.

Завдання
test

Swipe to show code editor

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

  1. Training the model with 100 epochs and learning rate 0.5.
  2. Get predictions of the model for every example in the test set.
  3. Calculate accuracy of the model.

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 6
toggle bottom row

book
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:

  1. 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%;

  2. 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;

  3. Cross-entropy (Cross-entropy) - often used in classification problems. This is a measure of how well the predicted probabilities match the actual labels;

  4. 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 epochs and learning rate before 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.

Завдання
test

Swipe to show code editor

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

  1. Training the model with 100 epochs and learning rate 0.5.
  2. Get predictions of the model for every example in the test set.
  3. Calculate accuracy of the model.

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 6
Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt