This is the mail archive of the
gsl-discuss@sourceware.org
mailing list for the GSL project.
computing R-squared with gsl_multifit
- From: Patrick Alken <patrick dot alken at colorado dot edu>
- To: gsl-discuss at sourceware dot org
- Date: Tue, 25 Sep 2007 13:46:28 -0600
- Subject: computing R-squared with gsl_multifit
Hi all,
This is a continuation of the discussion from help-gsl on
computing the R^2 "coefficient of determination" for multi-parameter
fits. I think it would be a useful thing to have and I propose
that the best way to add it in would be to compute it in
gsl_multifit_linear and gsl_multifit_wlinear and store it in
the gsl_multifit workspace. Then provide a function like
gsl_multifit_linear_Rsq to return the value to the user. This
way we wouldn't need to change the api and the multifit_linear
routines would remain backwards compatible.
Computing the value would require adding about 4-5 lines of
code and it can be computed at the same time as chisq so there
doesn't have to be an extra loop added in.
Patrick Alken