File Exchange

image thumbnail

Goodness of Fit

version 1.0.0.0 (3.07 KB) by Durga Lal Shrestha
Computes goodness of fit (model performance) for regression.

4 Downloads

Updated 04 Apr 2016

View License

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

Cite As

Durga Lal Shrestha (2020). Goodness of Fit (https://www.mathworks.com/matlabcentral/fileexchange/7968-goodness-of-fit), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

Mo.En

Very complete!

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' ;-)

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

al azhar

just what i need

Updates

1.0.0.0

BSD License

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: Goodness of Fit (Modified)