Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Minuit2::FumiliFCNBase Class Referenceabstract

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. The figure-of-merit describing the difference between the model function and the actual measurements has to be implemented by the user in a subclass of FumiliFCNBase. For an example see the FumiliChi2FCN and FumiliStandardChi2FCN classes.

Author
Andras Zsenei and Lorenzo Moneta, Creation date: 23 Aug 2004
See also
MINUIT Tutorial on function minimization, section 5
FumiliChi2FCN
FumiliStandardChi2FCN

Definition at line 46 of file FumiliFCNBase.h.

Public Member Functions

 FumiliFCNBase ()
 Default Constructor.
 
 FumiliFCNBase (unsigned int npar)
 Constructor which initializes the class with the function provided by the user for modeling the data.
 
 ~FumiliFCNBase () override
 
virtual unsigned int Dimension ()
 return number of function variable (parameters) , i.e.
 
virtual void EvaluateAll (const std::vector< double > &par)=0
 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.
 
virtual const std::vector< double > & Gradient () const
 Return cached Value of function Gradient estimated previously using the FumiliFCNBase::EvaluateAll method.
 
std::vector< doubleGradient (const std::vector< double > &) const override
 
std::vector< doubleHessian (const std::vector< double > &) const override
 Return Value of the i-th j-th element of the Hessian matrix estimated previously using the FumiliFCNBase::EvaluateAll method.
 
virtual double Hessian (unsigned int row, unsigned int col) const
 
virtual double Value () const
 Return cached Value of objective function estimated previously using the FumiliFCNBase::EvaluateAll method.
 
- Public Member Functions inherited from ROOT::Minuit2::FCNGradientBase
 ~FCNGradientBase () override
 
virtual bool CheckGradient () const
 
virtual std::vector< doubleG2 (const std::vector< double > &) const
 return second derivatives (diagonal of the Hessian matrix)
 
virtual std::vector< doubleGradientWithPrevResult (const std::vector< double > &parameters, double *, double *, double *) const
 
virtual GradientParameterSpace gradParameterSpace () const
 
virtual bool HasG2 () const
 
virtual bool HasHessian () const
 
- Public Member Functions inherited from ROOT::Minuit2::FCNBase
 ~FCNBase () override
 
virtual double ErrorDef () const
 Error definition of the function.
 
double operator() (const std::vector< double > &v) const override=0
 The meaning of the vector of parameters is of course defined by the user, who uses the values of those parameters to calculate their function Value.
 
virtual void SetErrorDef (double)
 add interface to set dynamically a new error definition Re-implement this function if needed.
 
virtual double Up () const =0
 Error definition of the function.
 
- Public Member Functions inherited from ROOT::Minuit2::GenericFunction
virtual ~GenericFunction ()
 

Protected Member Functions

std::vector< double > & Gradient ()
 
std::vector< double > & Hessian ()
 
virtual void InitAndReset (unsigned int npar)
 initialize and reset values of gradien and Hessian
 
void SetFCNValue (double value)
 

Private Attributes

std::vector< doublefGradient
 
std::vector< doublefHessian
 
unsigned int fNumberOfParameters
 
double fValue
 

#include <Minuit2/FumiliFCNBase.h>

Inheritance diagram for ROOT::Minuit2::FumiliFCNBase:
[legend]

Constructor & Destructor Documentation

◆ FumiliFCNBase() [1/2]

ROOT::Minuit2::FumiliFCNBase::FumiliFCNBase ( )
inline

Default Constructor.

Need in this case to create when implementing EvaluateAll the Gradient and Hessian vectors with the right size

Definition at line 54 of file FumiliFCNBase.h.

◆ FumiliFCNBase() [2/2]

ROOT::Minuit2::FumiliFCNBase::FumiliFCNBase ( unsigned int  npar)
inline

Constructor which initializes the class with the function provided by the user for modeling the data.

Parameters
nparthe number of parameters

Definition at line 65 of file FumiliFCNBase.h.

◆ ~FumiliFCNBase()

ROOT::Minuit2::FumiliFCNBase::~FumiliFCNBase ( )
inlineoverride

Definition at line 73 of file FumiliFCNBase.h.

Member Function Documentation

◆ Dimension()

virtual unsigned int ROOT::Minuit2::FumiliFCNBase::Dimension ( )
inlinevirtual

return number of function variable (parameters) , i.e.

function dimension

Definition at line 122 of file FumiliFCNBase.h.

◆ EvaluateAll()

virtual void ROOT::Minuit2::FumiliFCNBase::EvaluateAll ( const std::vector< double > &  par)
pure virtual

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.

Parameters
parvector of parameters

Implemented in ROOT::Minuit2::FumiliStandardChi2FCN, ROOT::Minuit2::FumiliStandardMaximumLikelihoodFCN, and ROOT::Minuit2::FumiliFCNAdapter< Function >.

◆ Gradient() [1/3]

std::vector< double > & ROOT::Minuit2::FumiliFCNBase::Gradient ( )
inlineprotected

Definition at line 139 of file FumiliFCNBase.h.

◆ Gradient() [2/3]

virtual const std::vector< double > & ROOT::Minuit2::FumiliFCNBase::Gradient ( ) const
inlinevirtual

Return cached Value of function Gradient estimated previously using the FumiliFCNBase::EvaluateAll method.

Definition at line 98 of file FumiliFCNBase.h.

◆ Gradient() [3/3]

std::vector< double > ROOT::Minuit2::FumiliFCNBase::Gradient ( const std::vector< double > &  ) const
inlineoverridevirtual

Implements ROOT::Minuit2::FCNGradientBase.

Definition at line 99 of file FumiliFCNBase.h.

◆ Hessian() [1/3]

std::vector< double > & ROOT::Minuit2::FumiliFCNBase::Hessian ( )
inlineprotected

Definition at line 141 of file FumiliFCNBase.h.

◆ Hessian() [2/3]

std::vector< double > ROOT::Minuit2::FumiliFCNBase::Hessian ( const std::vector< double > &  ) const
inlineoverridevirtual

Return Value of the i-th j-th element of the Hessian matrix estimated previously using the FumiliFCNBase::EvaluateAll method.

Parameters
rowrow Index of the matrix
colcol Index of the matrix

Reimplemented from ROOT::Minuit2::FCNGradientBase.

Definition at line 108 of file FumiliFCNBase.h.

◆ Hessian() [3/3]

virtual double ROOT::Minuit2::FumiliFCNBase::Hessian ( unsigned int  row,
unsigned int  col 
) const
inlinevirtual

Definition at line 109 of file FumiliFCNBase.h.

◆ InitAndReset()

virtual void ROOT::Minuit2::FumiliFCNBase::InitAndReset ( unsigned int  npar)
inlineprotectedvirtual

initialize and reset values of gradien and Hessian

Definition at line 129 of file FumiliFCNBase.h.

◆ SetFCNValue()

void ROOT::Minuit2::FumiliFCNBase::SetFCNValue ( double  value)
inlineprotected

Definition at line 137 of file FumiliFCNBase.h.

◆ Value()

virtual double ROOT::Minuit2::FumiliFCNBase::Value ( ) const
inlinevirtual

Return cached Value of objective function estimated previously using the FumiliFCNBase::EvaluateAll method.

Definition at line 92 of file FumiliFCNBase.h.

Member Data Documentation

◆ fGradient

std::vector<double> ROOT::Minuit2::FumiliFCNBase::fGradient
private

Definition at line 146 of file FumiliFCNBase.h.

◆ fHessian

std::vector<double> ROOT::Minuit2::FumiliFCNBase::fHessian
private

Definition at line 147 of file FumiliFCNBase.h.

◆ fNumberOfParameters

unsigned int ROOT::Minuit2::FumiliFCNBase::fNumberOfParameters
private

Definition at line 144 of file FumiliFCNBase.h.

◆ fValue

double ROOT::Minuit2::FumiliFCNBase::fValue
private

Definition at line 145 of file FumiliFCNBase.h.

Libraries for ROOT::Minuit2::FumiliFCNBase:

The documentation for this class was generated from the following file: