Opened 7 years ago

Closed 7 years ago

#966 closed defect (invalid)

Inconsistent chi2 reporting

Reported by: mathieu Owned by:
Priority: major Milestone: SasView 4.2.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

If you fit data with any model, the expectation is the following:

1- The parameters update to the fitted parameters
2- The chi2 updates to the value for the updated model

But after the fit is complete and you press enter (not changing any value) in any of the model parameters, you will notice that the chi2 will change.
It usually drops by a significant amount. I assume that the updated value is the correct one.

I had SasView 4.0 on my laptop so I tested it and it has the same issue.
So:

1- The problem dates back to at least 4.0
2- The problem exists for both DREAM and LM (didn’t test the other engines)

3- The problem exists for both built-in models and plug-in models

Change History (1)

comment:1 Changed 7 years ago by butler

  • Resolution set to invalid
  • Status changed from new to closed

As documented in ticket #930 and in some of the user list discussions this has been determined to in fact be the correct behavior. The documentation (and GUI information) needs to be fixed. The reason this is correct behavior is that what is being reported is the proper reduced chi2: (sum of residuals squared)/ DOF (degrees of freedom). For a fit the DOF = Npts-#fitted parameters. When hitting compute the #fitted parameters = 0 and therefore DOF=Npts.

Thus compute will always show a SMALLER chi2 than the fit value. the correct fitted value.

This ticket is therefore being closed at this point. Ticket #930 is still open pending updates listed there.

Note: See TracTickets for help on using tickets.