Ticket #10031 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Integrate FABADA into Mantid.

Reported by: Roman Tolchenov Owned by: Roman Tolchenov
Priority: major Milestone: Release 3.3
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Dan Nixon

Description

A bayesian fitting algorithm (FABADA) is being implemented as a minimizer plugin for Fit and will be integrated into Mantid via a pull request.

Remove FakeMinimizer created in #10008 for testing changes needed for FABADA.

Change History

comment:1 Changed 6 years ago by Martyn Gigg

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Diego Monserrat

  • Status changed from assigned to inprogress

Add the test. Re #10031

Changeset: 982f358e6d29006ac885eee637338e97ac35d0c2

comment:3 Changed 6 years ago by Roman Tolchenov

Merge branch 'master' into feature/10031_integrate_FABADA

Conflicts:

Code/Mantid/Framework/CurveFitting/src/Fit.cpp Code/Mantid/MantidQt/MantidWidgets/src/FitPropertyBrowser.cpp

Re #10031.

Changeset: 620e3b36a1668c7f4f2ad1ad3d1d7f88e2fb455f

comment:4 Changed 6 years ago by Roman Tolchenov

Re #10031. Corrections that use new fitting changes.

Changeset: 7e0fcea2b5e95f6f5d46537cf929e7828f48ca51

comment:5 Changed 6 years ago by Roman Tolchenov

Re #10031. Fixed the unit test.

Changeset: 1e7b7359b2b3099afdb9e7d4f132441eaa071648

comment:6 Changed 6 years ago by Roman Tolchenov

Re #10031. Removed spaces from propery names.

Changeset: 3ddbc94466f442e4a25f8744b9f9edee66003f54

comment:7 Changed 6 years ago by Roman Tolchenov

Re #10031. Some code restructuring.

Changeset: 9a38b75f5b11bd8a2d851dd9b69b6825b034d081

comment:8 Changed 6 years ago by Roman Tolchenov

Re #10031. Make it work with older versions of boost.

Changeset: 52050c495c45580106139c3b742d878eadb24123

comment:9 Changed 6 years ago by Roman Tolchenov

Re #10031. Fixing the test.

Changeset: f4a4aec55493d120789cf7e83d486a0fc5f04ec9

comment:10 Changed 6 years ago by Roman Tolchenov

Re #10031. Removed FakeMinimizer.

Changeset: 9951a953f9afa9ca942d7860f1eb9cb030c7d988

comment:11 Changed 6 years ago by Roman Tolchenov

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

To test:

  1. Load a data set to fit in FitPropertyBrowser.
  2. Select a function.
  3. Select FABADA minimizer.
  4. Set ChainLength property to a large number.
  5. Make sure MaxIterations isn't smaller than ChainLength.
  6. Run Fit.
  7. See that it works.
  8. Try changing minimizer's properties.

comment:12 Changed 6 years ago by Roman Tolchenov

  • Status changed from verify to reopened
  • Resolution fixed deleted

A change to Fit needs to be reverted.

comment:13 Changed 6 years ago by Roman Tolchenov

  • Status changed from reopened to inprogress

Re #10031. Revert changes to Fit

Changeset: ab8d37cfd096335076aa5102f0d2744788d852dd

comment:14 Changed 6 years ago by Roman Tolchenov

Re #10031. Fixing the unit test.

Changeset: 6e6b859bc2656a41240e24a76df4b9b387a377f5

comment:15 Changed 6 years ago by Roman Tolchenov

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

comment:16 Changed 6 years ago by Nick Draper

  • Status changed from verify to verifying
  • Tester set to Nick Draper

comment:17 Changed 6 years ago by Nick Draper

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Tried a fit of sp 1 from MAR11001. Linear background and Gaussian. Fit worked with Levenberg-Marquadt, but with FABADA gave the following error

Fit started
Error in execution of algorithm Fit:
WorkspaceProperty doesn't point to a workspace

comment:18 Changed 6 years ago by Roman Tolchenov

  • Status changed from reopened to inprogress

Re #10031. Make sure iterators are valid.

Changeset: 70ae4910acd5735637544721fa3c298ab50e9733

comment:19 Changed 6 years ago by Roman Tolchenov

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

comment:20 Changed 6 years ago by Dan Nixon

  • Status changed from verify to verifying
  • Tester changed from Nick Draper to Dan Nixon

comment:21 Changed 6 years ago by Dan Nixon

  • Status changed from verifying to reopened
  • Resolution fixed deleted

I tried irs26173_graphite002_red with a Lorentzian and linear background and have the same issue, fit works with Levenberg-Marquadt but not FABADA, same error message:

Error in execution of algorithm Fit:
WorkspaceProperty doesn't point to a workspace

comment:22 Changed 6 years ago by Roman Tolchenov

  • Status changed from reopened to inprogress

Re #10031. Throw exception if not converged.

Changeset: a1c750ef6313ec583ab55d8b29d1698948b7c3b2

comment:23 Changed 6 years ago by Roman Tolchenov

Re #10031. Fix for normal distribution on rhel6.

Changeset: 76dc6c27e124e606c9074345f76a87d58de7e571

comment:24 Changed 6 years ago by Roman Tolchenov

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

comment:25 Changed 6 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester changed from Dan Nixon to Wenduo Zhou

comment:26 Changed 6 years ago by Wenduo Zhou

  • Status changed from verifying to reopened
  • Resolution fixed deleted

I generated a Gaussian peak with flat background plus some noise. I tried to fit it with FABADA. This is what I got: Error in execution of algorithm Fit: Convegence NOT reached after 1999 iterations.

Try to set better initial values for parameters: f0.A0, f0.A1, f1.Height, f1.PeakCentre, f1.Sigma.

I set the change length as 10000 and maxiteration as 1000011 to make sure it larger than change length. I don't understand why this fitting algorithm stopped its effort just after 1999 iterations.

comment:27 Changed 6 years ago by Roman Tolchenov

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

The work on the minimizer isn't finished yet but for its developer (who isn't me) to be able to continue working on it it needs to be merged to master. More work needs to be done to improve robustness but at the moment the initial values have to be guessed to make it converge.

comment:28 Changed 6 years ago by Dan Nixon

  • Status changed from verify to verifying
  • Tester changed from Wenduo Zhou to Dan Nixon

comment:29 Changed 6 years ago by Dan Nixon

I managed to get a fit using irs26176_graphite002_red:

  • Flat background
    • A0 = 0.08
  • Lorentzian
    • Amplitude = 1.0
    • Peak Centre = 0.0
    • FWHM = 0.05
  • Chain Length = 10,000
  • Max Iterations = 100,000

comment:30 Changed 6 years ago by Roman Tolchenov

  • Status changed from verifying to closed

Merge branch 'master' into feature/10031_integrate_FABADA

Conflicts:

Code/Mantid/Framework/CurveFitting/src/Fit.cpp Code/Mantid/MantidQt/MantidWidgets/src/FitPropertyBrowser.cpp

Re #10031.

Full changeset: 620e3b36a1668c7f4f2ad1ad3d1d7f88e2fb455f

comment:31 Changed 6 years ago by Dan Nixon

Merge remote-tracking branch 'origin/feature/10031_integrate_FABADA'

Full changeset: 9b14ac9c196b070903d76a5a12628bddfa1f9c0a

comment:32 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10873

Note: See TracTickets for help on using tickets.