BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Extension of the FCNBase for the Fumili method. Fumili applies only to minimization problems used for fitting. The method is based on a linearization of the model function negleting second derivatives. User needs to provide the model function. In this cased the function to be minimized is the sum of the logarithms of the model function for the different measurements times -1.
Definition at line 51 of file FumiliMaximumLikelihoodFCN.h.
Public Member Functions | |
FumiliMaximumLikelihoodFCN () | |
virtual | ~FumiliMaximumLikelihoodFCN () |
virtual unsigned int | Dimension () |
virtual std::vector< double > | Elements (const std::vector< double > &par) const =0 |
virtual double | ErrorDef () const |
virtual void | EvaluateAll (const std::vector< double > &par)=0 |
virtual const std::vector< double > & | GetMeasurement (int Index) const =0 |
virtual int | GetNumberOfMeasurements () const =0 |
virtual const std::vector< double > & | Gradient () const |
virtual double | Hessian (unsigned int row, unsigned int col) const |
const ParametricFunction * | ModelFunction () const |
double | operator() (const std::vector< double > &par) const |
virtual void | SetErrorDef (double) |
void | SetModelFunction (const ParametricFunction &modelFCN) |
virtual double | Up () const |
virtual double | Value () const |
Protected Member Functions | |
std::vector< double > & | Gradient () |
std::vector< double > & | Hessian () |
virtual void | InitAndReset (unsigned int npar) |
void | SetFCNValue (double value) |
Private Attributes | |
std::vector< double > | fGradient |
std::vector< double > | fHessian |
const ParametricFunction * | fModelFunction |
unsigned int | fNumberOfParameters |
double | fValue |
|
inline |
Definition at line 55 of file FumiliMaximumLikelihoodFCN.h.
|
inlinevirtual |
Definition at line 57 of file FumiliMaximumLikelihoodFCN.h.
|
inlinevirtualinherited |
return number of function variable (parameters) , i.e. function dimension
Definition at line 132 of file FumiliFCNBase.h.
References ROOT::Minuit2::FumiliFCNBase::fNumberOfParameters.
|
pure virtual |
Evaluates the model function for the different measurement points and the Parameter values supplied, calculates a figure-of-merit for each measurement and returns a vector containing the result of this evaluation.
par | vector of Parameter values to feed to the model function. |
Implemented in ROOT::Minuit2::FumiliStandardMaximumLikelihoodFCN.
Referenced by operator()().
|
inlinevirtualinherited |
Error definition of the function. MINUIT defines Parameter errors as the change in Parameter Value required to change the function Value by up. Normally, for chisquared fits it is 1, and for negative log likelihood, its Value is 0.5. If the user wants instead the 2-sigma errors for chisquared fits, it becomes 4, as Chi2(x+n*sigma) = Chi2(x) + n*n.
Comment a little bit better with links!!!!!!!!!!!!!!!!!
Definition at line 93 of file FCNBase.h.
References ROOT::Minuit2::FCNBase::Up().
|
pure virtualinherited |
Evaluate function Value, Gradient and Hessian using Fumili approximation, for values of parameters p The resul is cached inside and is return from the FumiliFCNBase::Value , FumiliFCNBase::Gradient and FumiliFCNBase::Hessian methods
par | vector of parameters |
Implemented in ROOT::Minuit2::FumiliFCNAdapter< Function >, ROOT::Minuit2::FumiliStandardMaximumLikelihoodFCN, and ROOT::Minuit2::FumiliStandardChi2FCN.
|
pure virtual |
Accessor to the parameters of a given measurement. For example in the case of a chi-square fit with a one-dimensional Gaussian, the Parameter characterizing the measurement will be the position. It is the Parameter that is feeded to the model function.
Index | Index of the measueremnt the parameters of which to return |
Implemented in ROOT::Minuit2::FumiliStandardMaximumLikelihoodFCN.
|
pure virtual |
Accessor to the number of measurements used for calculating the present figure of merit.
Implemented in ROOT::Minuit2::FumiliStandardMaximumLikelihoodFCN.
|
inlineprotectedinherited |
Definition at line 149 of file FumiliFCNBase.h.
References ROOT::Minuit2::FumiliFCNBase::fGradient.
|
inlinevirtualinherited |
Return cached Value of function Gradient estimated previously using the FumiliFCNBase::EvaluateAll method
Definition at line 112 of file FumiliFCNBase.h.
References ROOT::Minuit2::FumiliFCNBase::fGradient.
|
inlineprotectedinherited |
|
inlinevirtualinherited |
Return Value of the i-th j-th element of the Hessian matrix estimated previously using the FumiliFCNBase::EvaluateAll method
row | row Index of the matrix |
col | col Index of the matrix |
Definition at line 120 of file FumiliFCNBase.h.
References ROOT::Minuit2::FumiliFCNBase::fGradient, and ROOT::Minuit2::FumiliFCNBase::fHessian.
|
inlineprotectedvirtualinherited |
initialize and reset values of gradien and Hessian
Definition at line 140 of file FumiliFCNBase.h.
References ROOT::Minuit2::FumiliFCNBase::fGradient, ROOT::Minuit2::FumiliFCNBase::fHessian, and ROOT::Minuit2::FumiliFCNBase::fNumberOfParameters.
|
inline |
Returns the model function used for the data.
Definition at line 80 of file FumiliMaximumLikelihoodFCN.h.
References fModelFunction.
|
inlinevirtual |
Calculates the function for the maximum likelihood method. The user must implement in a class which inherits from FumiliChi2FCN the member function Elements() which will supply the Elements for the sum.
par | vector containing the Parameter values for the model function |
Implements ROOT::Minuit2::FCNBase.
Definition at line 144 of file FumiliMaximumLikelihoodFCN.h.
References Elements(), and ROOT::Math::Util::EvalLog().
|
inlinevirtualinherited |
add interface to set dynamically a new error definition Re-implement this function if needed.
Reimplemented in ROOT::Minuit2::FumiliFCNAdapter< Function >, and ROOT::Minuit2::FCNAdapter< Function >.
|
inlineprotectedinherited |
|
inline |
Sets the model function for the data (for example gaussian+linear for a peak)
modelFunction | a reference to the model function. |
Definition at line 68 of file FumiliMaximumLikelihoodFCN.h.
References fModelFunction.
Referenced by ROOT::Minuit2::FumiliStandardMaximumLikelihoodFCN::FumiliStandardMaximumLikelihoodFCN().
|
inlinevirtual |
!!!!!!!!!!!! to be commented
Implements ROOT::Minuit2::FCNBase.
Definition at line 170 of file FumiliMaximumLikelihoodFCN.h.
|
inlinevirtualinherited |
Return cached Value of objective function estimated previously using the FumiliFCNBase::EvaluateAll method
Definition at line 106 of file FumiliFCNBase.h.
References ROOT::Minuit2::FumiliFCNBase::fValue.
|
privateinherited |
Definition at line 160 of file FumiliFCNBase.h.
Referenced by ROOT::Minuit2::FumiliFCNBase::Gradient(), ROOT::Minuit2::FumiliFCNBase::Hessian(), and ROOT::Minuit2::FumiliFCNBase::InitAndReset().
|
privateinherited |
Definition at line 161 of file FumiliFCNBase.h.
Referenced by ROOT::Minuit2::FumiliFCNBase::Hessian(), and ROOT::Minuit2::FumiliFCNBase::InitAndReset().
|
private |
Definition at line 175 of file FumiliMaximumLikelihoodFCN.h.
Referenced by ModelFunction(), and SetModelFunction().
|
privateinherited |
Definition at line 158 of file FumiliFCNBase.h.
Referenced by ROOT::Minuit2::FumiliFCNBase::Dimension(), and ROOT::Minuit2::FumiliFCNBase::InitAndReset().
|
privateinherited |
Definition at line 159 of file FumiliFCNBase.h.
Referenced by ROOT::Minuit2::FumiliFCNBase::SetFCNValue(), and ROOT::Minuit2::FumiliFCNBase::Value().