corrcoef - plotregression (which algorithm plotregression use)
3 次查看(过去 30 天)
显示 更早的评论
Hi,
I want to ask which algorithm does the plotregression use for calculating the R value?
"the R value spotted out above the window after we run the plotregression function (in ANN,or etc..)."
- Is it the R value that is calculated with the function R = corrcoef(X) ? or with a different function.
Best Regards.
0 个评论
回答(1 个)
Lucas García
2012-9-2
plotregression actually uses the regression function (also from Neural Network Toolbox) to compute the R value.
However, note that results are almost identical to corrcoef's output.
load simplefit_dataset
net = newff(simplefitInputs,simplefitTargets,10);
[net,tr] = train(net,simplefitInputs,simplefitTargets);
simplefitOutputs = sim(net,simplefitInputs);
plotregression(simplefitTargets,simplefitOutputs);
R value in plotregression is computed this way:
[r,m,b] = regression(simplefitTargets,simplefitOutputs);
Using corrcoef:
c = corrcoef(simplefitTargets,simplefitOutputs);
Values should be almost identical. In my test:
norm(c(1,2) - r)
ans =
5.551115123125783e-16
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Descriptive Statistics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!