Defining the best validation performance epoch for Neural Network.

15 次查看(过去 30 天)
I have a trained a network and it seems like the best validation performance has happened at epoch 84. This is what the plot generated by the nntrain tool shows, and also best_epoch variable stored in tr:
However, when I look at the values stored for tr.vperf, it seems like it is epoch 85 that has the reported minimum performance. I would appreciate it if someone can confirm if this is an error, or it is simply becuase the first epoch does not count.

回答(1 个)

Lokesh
Lokesh 2023-10-12
Hi Yasaman,
I understand that the best_epoch variable stored in tr contains the value 84. However, when examining the values stored in tr.vperf, it appears that the 85th epoch has the reported minimum performance.
The discrepancy between the best validation performance epoch indicated by the plot and the reported minimum performance epoch in tr.vperf can be attributed to the indexing convention used for epochs. In this convention, the first epoch is represented by 0, the second epoch by 1, and so on. Therefore, the value 84 stored in the best_epoch variable corresponds to the 85th epoch, aligning with your observation. To confirm this, you can examine the "tr.epoch" variable, which should show the epochs starting from 0.
Here is an example code snippet:
tr.epoch
% [0 1 2 3 4 5 6 7 8 9 10 11 12]
tr.vperf
% [0.5244 0.0164 0.0093 0.0068 0.0043 0.0022 0.0020 0.0021 0.0023 0.0023 0.0024 0.0024 0.0024]
tr.best_epoch
% 6
In this code snippet, "tr.epoch" displays the epochs starting from 0, and "tr.vperf" shows the corresponding performance values for each epoch. The "tr.best_epoch" variable confirms that the best epoch is indeed 6, which aligns with the 7th epoch in the indexing convention starting from 0.
Please refer to the following MATLAB documentation link to know about the “tr”( Training record) structure:
I hope you find this helpful.
Best Regards,
Lokesh

类别

Help CenterFile Exchange 中查找有关 Genomics and Next Generation Sequencing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by