Refactoring #1469
Feature #284: === Fit ===
Package Multifit-Suite as separate library
Status: | Rejected | Start date: | 28 Jul 2016 | |
---|---|---|---|---|
Priority: | Low | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | - | |||
Target version: | - |
Description
- libgufl = Grand Unified Fit Library
- libfitagain
- libfitsuite # surprisingly, zero Google hits !
- something less grandious?
Will contain parameter wrappers and a suite of minimizers.
Will not depend on BornAgain. Just the other way round, BornAgain will depend on libgufl.
Motivation: separation of concerns; reduction of BornAgain recompile time; and in the long term: separate publication and reuse in other projects.
Subtasks
History
#1 Updated by wuttke over 4 years ago
- Parent task changed from #1290 to #284
#3 Updated by wuttke over 4 years ago
- Assignee deleted (
wuttke)
Halted after bbac161 (minor cleanup, and split of Fit/ into four directories with clear include hierarchy)
#4 Updated by wuttke over 4 years ago
- Status changed from Backlog to Sprint
- Assignee set to wuttke
- Target version set to Sprint32
good progress in 008f21a;
base classes and utilities moved to Fit/ require second thought
#5 Updated by wuttke over 4 years ago
- Subject changed from Encapsulate fit wrapper to Package Multifit-Suite as separate library
rewrote title and description
#6 Updated by wuttke over 4 years ago
- Description updated (diff)
#7 Updated by wuttke over 4 years ago
- Priority changed from Normal to High
priority set to high because rapid return to stability in directory structures is desired
#9 Updated by pospelov over 4 years ago
- Status changed from Sprint to Backlog
- Target version deleted (
Sprint32)
Within #1466 and #1605 FitKernel was moved on board of Fit library. Now it is possible to find the minimum of arbitrary function
std::function<double(const std::vector<double> &)>
outside of FitSuite context. Function accepts parameters and returns the value. Result of minimization is a set of parameters, which gives a minimum value of the function.
To fit it, something like that should be done
// function whose minimum we are going to find double TestFunctions::RosenBrock(const std::vector<double> &par) { const double x = par[0]; const double y = par[1]; const double tmp1 = y-x*x; const double tmp2 = 1-x; return 100*tmp1*tmp1+tmp2*tmp2; } // code necessary to run fitting FitKernel kernel; kernel.setMinimizer("Minuit2", "Migrad"); kernel.setObjectiveFunction(Rosenbrock); kernel.addFitParameter("par0", -1.2); kernel.addFitParameter("par1", -1.3); kernel.minimize(); kernel.reportResults(); }
See also StandaloneFitTest.cpp from our functional test machinery.
In the future, it can be provided with python binding, the main actor FitKernel can be renamed, interfaces made even more convenient, and, as was planned, packaged as separate library. But I guess for this sprint, we have spend already lots of time on fitting. Also we have to let it lay a bit in peace, to may opinion, and to make our minds about future evolution.
#10 Updated by wuttke about 4 years ago
- Description updated (diff)
#11 Updated by wuttke about 4 years ago
- Status changed from Backlog to Long Term Idea
#12 Updated by pospelov over 3 years ago
- Status changed from Long Term Idea to Rejected
Rejected, see #1823