No BSD License  

Highlights from
Goodness of Fit

4.0

4.0 | 2 ratings Rate this file 17 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)

Computes goodness of fit (model performance) for regression.

| 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
mathematics Durga Lal Shrestha 22 Oct 2008 07:52:11
model performance Durga Lal Shrestha 22 Oct 2008 07:52:11
model performance Antonio 29 Jun 2011 06:51:58

Contact us at files@mathworks.com