Effacer les filtres
Effacer les filtres

calculate training coeffecient of determination r^2 and mean absolute error

4 vues (au cours des 30 derniers jours)
Mahi
Mahi le 24 Déc 2023
Commenté : Mahi le 25 Déc 2023
Hi everyone,I hope this message finds you well. I am currently working on a prediction task using LSTM, and I have successfully obtained the training RMSE using info in following codde
[net info] = trainNetwork(xtrain, ytrain, layers, options);
i have also obtained testing metrics using their formulas
Y = predict(net, xtest);
e = (ytest - Y);
rmse = mean(sqrt(mean((Y - ytest).^2)));
mae1 = mae(e);
Rsq1 = 1 - sum((ytest - Y).^2) / sum((ytest - mean(ytest)).^2);
mse = mean(mean((ytest - Y).^2));
However, I am curious to know if there is a straightforward way to retrieve additional training metrics such as R² and MAE for the LSTM model. Your insights and guidance on this matter would be greatly appreciated.
Thank you in advance for your time and assistance.

Réponse acceptée

Debraj Maji
Debraj Maji le 25 Déc 2023
Hi @Mahi,
I understand that you are trying to retrieve additional training metrics for the aforementioned LSTM Model. As of 2023b the available metrics for tracking are:
  • AccuracyMetric
  • AUCMetric
  • FScoreMetric
  • PrecisionMetric
  • RecallMetric
  • RMSEMetric
One of the ways to track R-squared and MAE during training is by creating a custom Deep Learning Metric Object and specifying it in 'trainingOptions' under Metrics argument. The steps to create a Deep Learning Metric Object can be found here: https://in.mathworks.com/help/deeplearning/ug/define-custom-deep-learning-metric.html
For more info on options available during training you can refer to the following documentation:
I hope this resolves your query.
With regards,
Debraj.

Plus de réponses (0)

Catégories

En savoir plus sur Deep Learning for Image Processing dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by