Ticket #9030 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Use the covariance matrix for fitting error propagation

Reported by: Roman Tolchenov Owned by: Roman Tolchenov
Priority: major Milestone: Release 3.2
Component: Framework Keywords:
Cc: gesner.passos@… Blocked By:
Blocking: #8977 Tester: Wenduo Zhou

Description (last modified by Roman Tolchenov) (diff)

At the moment to estimate the errors of the calculated values we are using the formula:

err = sqrt( sigma2 * J * JT )

where sigma are standard deviations of the parameters and J is the Jacobian. This doesn't take into account correlation between the parameters and may lead to overestimated errors. I want to try to use a more accurate formula:

err = sqrt( J * C * JT )

where C is the covariance matrix.

Attachments

compare_errors.py (2.0 KB) - added by Gesner Passos 7 years ago.
File that highlight the systemtests that will change with the new error propagation

Change History

comment:1 Changed 7 years ago by Nick Draper

  • Status changed from new to infoneeded

Could you add a bit more description please.

comment:2 Changed 7 years ago by Roman Tolchenov

  • Description modified (diff)

comment:3 Changed 7 years ago by Roman Tolchenov

  • Status changed from infoneeded to new

comment:4 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

comment:5 Changed 7 years ago by Roman Tolchenov

  • Cc gesner.passos@… added

comment:6 Changed 7 years ago by Roman Tolchenov

  • Status changed from assigned to inprogress

Re #9030. Removed unused classes.

Changeset: 65a9f64fe4620062059b0f83f9f30e7a3fb586fc

comment:7 Changed 7 years ago by Roman Tolchenov

Re #9030. Use covariance matrix to estimate errors of calc. values

Changeset: 390e8021a205792408b1f86517aa1df87aee4270

comment:8 Changed 7 years ago by Roman Tolchenov

Re #9030. Added a unit test

Changeset: 18b7c64594ced719140c932ff96103f198f96f6d

comment:9 Changed 7 years ago by Roman Tolchenov

Re #9030. Changed getCovarianceMatrix to return a const Matrix

Changeset: a09765134950053c58031b555cae637822450238

comment:10 Changed 7 years ago by Roman Tolchenov

Re #9030. Use chi squared in error calculation

Changeset: db9ab977afc71f1788826529a0943b73fe432cd7

comment:11 Changed 7 years ago by Gesner Passos

  • Blocking 9011 added

(In #9011) The entire fit will change the way it calculates error. It will have impact on CalculateTransmission.

comment:12 Changed 7 years ago by Roman Tolchenov

Re #9030. Removed unused classes.

Changeset: f4e931b6b86783b92b2008dcead357a8465cca4e

comment:13 Changed 7 years ago by Roman Tolchenov

Re #9030. Use covariance matrix to estimate errors of calc. values

Changeset: ed25aa030a67b2ca375cc4dcfd12f96bcd979fce

comment:14 Changed 7 years ago by Gesner Passos

Last edited 7 years ago by Gesner Passos (previous) (diff)

comment:15 Changed 7 years ago by Gesner Passos

The last was not merged to develop, it is just a branch created in case Roman will need to merge them to develop later. The compare_errors.py was the file I used to compare the current results of SystemTests and the new ones when applying this ticket. Testers may be interested in using something like.

Last edited 7 years ago by Gesner Passos (previous) (diff)

Changed 7 years ago by Gesner Passos

File that highlight the systemtests that will change with the new error propagation

comment:16 Changed 7 years ago by Gesner Passos

  • Blocking 8977 added

comment:17 Changed 7 years ago by Gesner Passos

  • Blocking 9011 removed

comment:18 Changed 6 years ago by Roman Tolchenov

Merge branch 'master' into feature/9030_fitting_error_propagation

Conflicts:

Code/Mantid/Framework/API/inc/MantidAPI/IDomainCreator.h Code/Mantid/Framework/CurveFitting/inc/MantidCurveFitting/FitMW.h Code/Mantid/Framework/CurveFitting/inc/MantidCurveFitting/MultiDomainCreator.h Code/Mantid/Framework/CurveFitting/src/FitMW.cpp Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/FitMD.h Code/Mantid/Framework/MDEvents/src/FitMD.cpp

Re #9030

Changeset: 939b68caa756a22acd24c5a783d0dad9af34a6c5

comment:19 Changed 6 years ago by Roman Tolchenov

Re #9030. Fixed an error after a merge with master.

Changeset: df6aaf38132040ec98e993c059fb66c40aa98bde

comment:20 Changed 6 years ago by Roman Tolchenov

Re #9030. Fix a doxygen warning

Changeset: 34c1e2e3e6891da4ae1e75b72128ee30101cadc8

comment:21 Changed 6 years ago by Roman Tolchenov

Re #9030. Replaced files to avoid merge conflicts.

Changeset: 5d448583305f341145c55f8f6ebacb2dc5784238

comment:22 Changed 6 years ago by Roman Tolchenov

Re #9030. Updated ref files due to change in fitting errors.

Changeset: fa399288d2fa4758e84b4b2337bd65b2b4741aff

comment:23 Changed 6 years ago by Roman Tolchenov

  • Status changed from inprogress to verify
  • Resolution set to fixed

To test:

  1. Load MUSR00015189 from AutoTestData.
  2. Fit its 1st spectrum with a Polynomial(n=5) on interval 0.3-30.
  3. Plot the calculated spectrum with error bars.
  4. The error bars should be reasonable.

comment:24 Changed 6 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester set to Wenduo Zhou

comment:25 Changed 6 years ago by Samuel Jackson

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/9030_fitting_error_propagation'

Full changeset: 74c7ae4bcdaf3aae0402e19e604f141b68c7129b

comment:26 Changed 6 years ago by Samuel Jackson

Merge remote-tracking branch 'origin/feature/9030_fitting_error_propagation'

Full changeset: 38c7de6d6b91630fbc36d06052a87fd20d5f87b6

comment:27 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9873

Note: See TracTickets for help on using tickets.