Evaluation of Generalized Linear Model in Machine Learning
1 次查看(过去 30 天)
显示 更早的评论
Hi,I have this line of code which help to fit a normal distribution curve over my predictors.The problem is I have searched through whole of the GLM page and could not find the appropriate function which would enable to find the RMSE of my model. Further more I was looking for appropriate function that would give the error obtained from the testing set. Do it have to call the predict method manually, is there a more automatic process for it. Thanks.
mdl = GeneralizedLinearModel.stepwise(X,Y,'linear','distr','normal')
0 个评论
采纳的回答
Star Strider
2014-5-26
Probably the easiest way:
r = mdl.Residuals.Raw
RMSE = sqrt(mean(r.^2));
3 个评论
Star Strider
2014-5-26
SSR is the regression sum of squares, the sum of squared deviations of the fitted values from their mean.
SSE is the sum of squared errors (residuals).
SST is the total sum of squares, the sum of squared deviations of y from mean(y).
These are probably easy to code, possibly with an ‘anonymous function’. (I haven’t coded them because I get them from the functions.) I suggest you get them from the structures returned by the functions, and store them in a ‘.mat’ file for future reference if you’re going to be using them more than once.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!