plotregression fitlm rsquare difference
显示 更早的评论
Hello
Could you help explain why there is a difference between r-squared calculated using plotregression() and fitlm()?
R-squared: 0.968 from fitlm() R = 0.98364 from plotregression()
The code to produce the two r-squared values is below.
%% set up variable from neural network output = net(input); outputTest = output(tr.testInd); targetTest = target(tr.testInd);
%% first method to produce r-squared plotregression(targetTest,outputTest,'Testing')
%% second method to produce r-squared mdl = fitlm(targetTest,outputTest); r2 = mdl.Rsquared.Ordinary;
Regards
William Bell
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Pattern Recognition 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!