Why value from predicted value from the regression equation and predicted value directly from matlab are not matching?
1 次查看(过去 30 天)
显示 更早的评论
I ploted the regression model using following codes (4 input P,V,T,H, and 1 output,TS)
X = [P, T, V, H, P.*T, P.*V, P.*H, T.*V, T.*H, V.*H, P.^2, T.^2, V.^2, H.^2];
Y = TS;
mdl = fitlm(X, Y);
disp(mdl);
coefficients = mdl.Coefficients.Estimate;
disp(coefficients);
yfit = predict(mdl,X)
I frormed the regression equation and calculated the predicted in excel, ideally it should match with the value I am getting from yfit = predict(mdl,X)
But it does not match. Can anyone explain why?
1 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!