candle-book/src/training/simplified.md
This program implements a neural network to predict the winner of the second round of elections based on the results of the first round.
Basic moments:
Thus, this neural network learns to find hidden relationships between the results of the first and second rounds of voting in order to make predictions for new data.
{{#include ../simplified.rs:book_training_simplified1}}
{{#include ../simplified.rs:book_training_simplified2}}
{{#include ../simplified.rs:book_training_simplified3}}
Trying to train neural network.
Epoch: 1 Train loss: 4.42555 Test accuracy: 0.00%
Epoch: 2 Train loss: 0.84677 Test accuracy: 33.33%
Epoch: 3 Train loss: 2.54335 Test accuracy: 33.33%
Epoch: 4 Train loss: 0.37806 Test accuracy: 33.33%
Epoch: 5 Train loss: 0.36647 Test accuracy: 100.00%
real_life_votes: [13, 22]
neural_network_prediction_result: 0.0