Difference between FitPercent value calculated in idpoly class and manually. (Get predicted y value in ARX function)
9 views (last 30 days)
Show older comments
I want to compare accuracy of my several modeling method, arx is one of them.
So I calculate predicted y value of arx model with function 'compare'.
But when I calculate FitPercent like this documentation. https://www.mathworks.com/help/ident/ug/model-quality-metrics.html
My calculation and FitPercent value from sys.Report.Fit.FitPercent are different.
So I have 2 questions.
1. Is it right method using compare function to get predicted y value? Is there any others?
2. If calculation procedure of predicted y value is not wrong, why the NRMSE value calculated by predicted y value and sys.Report.Fit.FitPercent are different?
load iddata1
sys_armax = armax(z1,[2 3 1 0]);
[ymodel, ~, ~] = compare(z1, sys_armax);
ymodel = ymodel.y;
ymeasured = z1.y;
fit1 = goodnessOfFit(ymodel, ymeasured, 'NRMSE') % using function 'goodnessOfFit' to calculate NRMSE
fit2 = 100*(1-norm(ymeasured-ymodel)/norm(ymeasured-mean(ymeasured))) % From documentation
fit3 = sys_armax.Report.Fit.FitPercent % Get NRMSE value from idpoly class.
fit1 =
0.7027
fit2 =
70.2738
fit3 =
76.0267
0 Comments
Answers (0)
See Also
Categories
Find more on Nonlinear ARX Models in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!