Sunday, June 22, 2014

Mean Square Error Implementation and gfit2 function in matlab

most likely when you create a regression model you want to evaluate the model to estimate the googdness of your fit. Most common way of doing that is to calculate the mean square error. here is the implementation of that in Matlab :

 X = randn(256,256);  
   Xapp = randn(256,256);  
   D = abs(X-Xapp).^2;  
   MSE = sum(D(:))/numel(X);  

There is also a function by Richard Crozier that offer various methods to evaluate the goodness of fit. you can find it in here:






No comments:

Post a Comment