Jpp
|
Fit method based on the Levenberg-Marquardt method. More...
#include <JGandalf.hh>
Classes | |
struct | result_type |
Data structure for return value of fit function. More... | |
Public Types | |
typedef JModel_t::parameter_type | parameter_type |
Data type of fit parameter. More... | |
Public Member Functions | |
JGandalf () | |
Default constructor. More... | |
template<class JFunction_t , class T1 , class T2 > | |
double | operator() (const JFunction_t &fit, T1 __begin1, T1 __end1, T2 __begin2, T2 __end2) |
Multi-dimensional fit of two data sets. More... | |
template<class JFunction_t , class T > | |
double | operator() (const JFunction_t &fit, T __begin, T __end) |
Multi-dimensional fit of one data set. More... | |
Public Attributes | |
double | lambda |
JModel_t | value |
JModel_t | error |
std::vector< parameter_type > | parameters |
int | numberOfIterations |
JMATH::JMatrixNS | H |
Static Public Attributes | |
static int | MAXIMUM_ITERATIONS = 1000 |
maximal number of iterations More... | |
static double | EPSILON = 1.0e-4 |
maximal distance to minimum More... | |
static double | LAMBDA_MIN = 0.01 |
minimal value control parameter More... | |
static double | LAMBDA_MAX = 100.0 |
maximal value control parameter More... | |
static double | LAMBDA_UP = 9.0 |
multiplication factor control parameter More... | |
static double | LAMBDA_DOWN = 11.0 |
multiplication factor control parameter More... | |
static double | PIVOT = 1.0e-3 |
minimal value diagonal element of matrix More... | |
static int | debug = 0 |
debug level (default is off). More... | |
Private Member Functions | |
void | reset () |
Reset. More... | |
template<class JFunction_t , class T > | |
void | evaluate (const JFunction_t &fit, T __begin, T __end) |
Evaluate fit for given data set. More... | |
Private Attributes | |
double | chi2 |
JModel_t | gradient |
JModel_t | previous |
std::vector< double > | h |
Fit method based on the Levenberg-Marquardt method.
The template argument refers to the model that should be fitted to the data. This data structure should have arithmetic capabalities.
The data member JGandalf::value corresponds to the start or final value of the model of the fit procedure and JGandalf::error to the uncertainties. The co-variance matrix is stored in data member JGandalf::H. The data member JGandalf::parameters is a list of pointers to those data members of the model that should be fitted. The template fit function should return the data type JGandalf::result_type which is composed of the values of the chi2 and gradient of a data point, respectively. The function operator returns the chi2 of the fit.
Definition at line 45 of file JGandalf.hh.
typedef JModel_t::parameter_type JFIT::JGandalf< JModel_t >::parameter_type |
Data type of fit parameter.
Definition at line 56 of file JGandalf.hh.
|
inline |
|
inline |
Multi-dimensional fit of two data sets.
The fit function should return the equivalent of chi2 for the current value of the model and the given data point as well as the partial derivatives.
fit | fit function |
__begin1 | begin of first data set |
__end1 | end of first data set |
__begin2 | begin of second data set |
__end2 | end of second data set |
Definition at line 122 of file JGandalf.hh.
|
inline |
Multi-dimensional fit of one data set.
The fit function should return the equivalent of chi2 for the current value of the model and the given data point as well as the partial derivatives.
fit | fit function |
__begin | begin of data |
__end | end of data |
Definition at line 249 of file JGandalf.hh.
|
inlineprivate |
Reset.
Definition at line 275 of file JGandalf.hh.
|
inlineprivate |
Evaluate fit for given data set.
fit | fit function |
__begin | begin of data |
__end | end of data |
Definition at line 292 of file JGandalf.hh.
|
static |
maximal number of iterations
maximal number of iterations.
Definition at line 255 of file JGandalf.hh.
|
static |
maximal distance to minimum
maximal distance to minimum.
Definition at line 256 of file JGandalf.hh.
|
static |
minimal value control parameter
Definition at line 257 of file JGandalf.hh.
|
static |
maximal value control parameter
Definition at line 258 of file JGandalf.hh.
|
static |
multiplication factor control parameter
Definition at line 259 of file JGandalf.hh.
|
static |
multiplication factor control parameter
Definition at line 260 of file JGandalf.hh.
|
static |
minimal value diagonal element of matrix
Definition at line 261 of file JGandalf.hh.
double JFIT::JGandalf< JModel_t >::lambda |
Definition at line 264 of file JGandalf.hh.
JModel_t JFIT::JGandalf< JModel_t >::value |
Definition at line 265 of file JGandalf.hh.
JModel_t JFIT::JGandalf< JModel_t >::error |
Definition at line 266 of file JGandalf.hh.
std::vector<parameter_type> JFIT::JGandalf< JModel_t >::parameters |
Definition at line 267 of file JGandalf.hh.
int JFIT::JGandalf< JModel_t >::numberOfIterations |
Definition at line 268 of file JGandalf.hh.
JMATH::JMatrixNS JFIT::JGandalf< JModel_t >::H |
Definition at line 269 of file JGandalf.hh.
|
private |
Definition at line 309 of file JGandalf.hh.
|
private |
Definition at line 310 of file JGandalf.hh.
|
private |
Definition at line 311 of file JGandalf.hh.
|
private |
Definition at line 312 of file JGandalf.hh.
|
staticinherited |
debug level (default is off).
Definition at line 43 of file JMessage.hh.