How to save loss, rmse, mae, and mape in every training epoch?

5 visualizaciones (últimos 30 días)
a a
a a el 29 de Oct. de 2020
Respondida: Pratik el 12 de Dic. de 2024
Is there any suggestion on how to save the loss, rmse, mae, and mape in every training epoch? I want to compare them in condition of different parameters later.
Cheers
FYI I calculate the rmse, mae, and mape in the end like this:
net = trainNetwork(XTrain,YTrain,layers,options);
net = predictAndUpdateState(net,XTrain);
[net,YPred] = predictAndUpdateState(net,XTest);
YPred = sig(1)*YPred + mu(1);
YTest = dataTest(1,:);
rmse = sqrt(mean((YPred-YTest).^2))
mae = mean(abs(YPred-YTest))
mape = mean(abs((YPred-YTest)./YTest))*100

Respuestas (1)

Pratik
Pratik el 12 de Dic. de 2024
Hi,
To monitor the metrics such as loss, rmse and etc, training options can be used. Also built in metric object can be used to store the values to use later.
Please refer to the following documentation for more information:

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by