Evaluation of Generalized Linear Model in Machine Learning
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Motiur
el 26 de Mayo de 2014
Comentada: Star Strider
el 26 de Mayo de 2014
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 comentarios
Respuesta aceptada
Star Strider
el 26 de Mayo de 2014
Probably the easiest way:
r = mdl.Residuals.Raw
RMSE = sqrt(mean(r.^2));
3 comentarios
Star Strider
el 26 de Mayo de 2014
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.
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!