4.0

4.0 | 2 ratings Rate this file 143 downloads (last 30 days) File Size: 3.07 KB File ID: #7968

Goodness of Fit

by Durga Lal Shrestha

 

03 Jul 2005 (Updated 05 Jul 2005)

No BSD License  

Computes goodness of fit (model performance) for regression.

Download Now | Watch this File

File Information
Description

Computes goodness of fit for regression model given vector of target and output values.

USAGE:
   [gf] = gfit(t,y)
   [gf] = gfit(t,y,gFitMeasure)
     
INPUT
t: vector of target values for regression model

y: vector of output from regression model.

gFitMeasure: string value representing different form of goodness of fit measure (for eg. '1' - mean squarred error, '5' - mean absolute error)
         
OUTPUT:
 gf: goodness of fit values between model output and target

Acknowledgements
This submission has inspired the following:
Goodness of Fit (Modified)
MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
10 Dec 2007 al azhar

just what i need

11 Sep 2008 Felix Hebeler

Script does not check for NaNs, and matrices have to be reshaped. If you need a simple script to calculate RMSE, that considers NaNs and operates on matrices, please check
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=21383&objectType=FILE

26 Sep 2008 Clement Atzberger

Function file performs very well. Good work! Unfortunately, only vectors can be input. Also I miss the possibility to calculate several statistics at the same function call. Please check your expression 'squarred' (sic!) misspelled throughout the file. This is correctly spelled as 'squared' ... with one 'r' ;-)

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
goodness Durga Lal Shrestha 22 Oct 2008 07:52:11
fit Durga Lal Shrestha 22 Oct 2008 07:52:11
model performance Durga Lal Shrestha 22 Oct 2008 07:52:11
mathematics Durga Lal Shrestha 22 Oct 2008 07:52:11
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com