Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Minuit2::FumiliMaximumLikelihoodFCN 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. In this cased the function to be minimized is the sum of the logarithms of the model function for the different measurements times -1.

Author
Andras Zsenei and Lorenzo Moneta, Creation date: 3 Sep 2004
See also
MINUIT Tutorial on function minimization, section 5
FumiliStandardMaximumLikelihoodFCN

Definition at line 46 of file FumiliMaximumLikelihoodFCN.h.

Public Member Functions

 FumiliMaximumLikelihoodFCN ()
 
 ~FumiliMaximumLikelihoodFCN () override
 
virtual std::vector< doubleElements (const std::vector< double > &par) const =0
 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.
 
virtual const std::vector< double > & GetMeasurement (int Index) const =0
 Accessor to the parameters of a given measurement.
 
virtual int GetNumberOfMeasurements () const =0
 Accessor to the number of measurements used for calculating the present figure of merit.
 
const ParametricFunctionModelFunction () const
 Returns the model function used for the data.
 
double operator() (const std::vector< double > &par) const override
 Calculates the function for the maximum likelihood method.
 
void SetModelFunction (const ParametricFunction &modelFCN)
 Sets the model function for the data (for example gaussian+linear for a peak)
 
double Up () const override
 !!!!!!!!!!!! to be commented
 
- Public Member Functions inherited from ROOT::Minuit2::FumiliFCNBase
 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.
 
virtual void SetErrorDef (double)
 add interface to set dynamically a new error definition Re-implement this function if needed.
 
- Public Member Functions inherited from ROOT::Minuit2::GenericFunction
virtual ~GenericFunction ()
 

Private Attributes

const ParametricFunctionfModelFunction
 

Additional Inherited Members

- Protected Member Functions inherited from ROOT::Minuit2::FumiliFCNBase
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)
 

#include <Minuit2/FumiliMaximumLikelihoodFCN.h>

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

Constructor & Destructor Documentation

◆ FumiliMaximumLikelihoodFCN()

ROOT::Minuit2::FumiliMaximumLikelihoodFCN::FumiliMaximumLikelihoodFCN ( )
inline

Definition at line 49 of file FumiliMaximumLikelihoodFCN.h.

◆ ~FumiliMaximumLikelihoodFCN()

ROOT::Minuit2::FumiliMaximumLikelihoodFCN::~FumiliMaximumLikelihoodFCN ( )
inlineoverride

Definition at line 51 of file FumiliMaximumLikelihoodFCN.h.

Member Function Documentation

◆ Elements()

virtual std::vector< double > ROOT::Minuit2::FumiliMaximumLikelihoodFCN::Elements ( const std::vector< double > &  par) const
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.

Parameters
parvector of Parameter values to feed to the model function.
Returns
A vector containing the figures-of-merit for the model function evaluated for each set of measurements.

Implemented in ROOT::Minuit2::FumiliStandardMaximumLikelihoodFCN.

◆ GetMeasurement()

virtual const std::vector< double > & ROOT::Minuit2::FumiliMaximumLikelihoodFCN::GetMeasurement ( int  Index) const
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.

Parameters
IndexIndex of the measueremnt the parameters of which to return
Returns
A vector containing the values characterizing a measurement

Implemented in ROOT::Minuit2::FumiliStandardMaximumLikelihoodFCN.

◆ GetNumberOfMeasurements()

virtual int ROOT::Minuit2::FumiliMaximumLikelihoodFCN::GetNumberOfMeasurements ( ) const
pure virtual

Accessor to the number of measurements used for calculating the present figure of merit.

Returns
the number of measurements

Implemented in ROOT::Minuit2::FumiliStandardMaximumLikelihoodFCN.

◆ ModelFunction()

const ParametricFunction * ROOT::Minuit2::FumiliMaximumLikelihoodFCN::ModelFunction ( ) const
inline

Returns the model function used for the data.

Returns
Returns a pointer to the model function.

Definition at line 71 of file FumiliMaximumLikelihoodFCN.h.

◆ operator()()

double ROOT::Minuit2::FumiliMaximumLikelihoodFCN::operator() ( const std::vector< double > &  par) const
inlineoverridevirtual

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.

Parameters
parvector containing the Parameter values for the model function
Returns
The sum of the natural logarithm of the Elements multiplied by -1
See also
FumiliFCNBase::elements

Implements ROOT::Minuit2::FCNBase.

Definition at line 129 of file FumiliMaximumLikelihoodFCN.h.

◆ SetModelFunction()

void ROOT::Minuit2::FumiliMaximumLikelihoodFCN::SetModelFunction ( const ParametricFunction modelFCN)
inline

Sets the model function for the data (for example gaussian+linear for a peak)

Parameters
modelFCNa reference to the model function.

Definition at line 61 of file FumiliMaximumLikelihoodFCN.h.

◆ Up()

double ROOT::Minuit2::FumiliMaximumLikelihoodFCN::Up ( ) const
inlineoverridevirtual

!!!!!!!!!!!! to be commented

Implements ROOT::Minuit2::FCNBase.

Definition at line 153 of file FumiliMaximumLikelihoodFCN.h.

Member Data Documentation

◆ fModelFunction

const ParametricFunction* ROOT::Minuit2::FumiliMaximumLikelihoodFCN::fModelFunction
private

Definition at line 157 of file FumiliMaximumLikelihoodFCN.h.

Libraries for ROOT::Minuit2::FumiliMaximumLikelihoodFCN:

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