Virtual base class for implementation of likelihood gradient calculation strategies.
This class provides the interface necessary for RooMinimizer (through MinuitFcnGrad) to get the likelihood gradient values it needs for fitting the pdf to the data. The strategy by which these values are obtained is up to the implementer of this class. Its intended purpose was mainly to allow for parallel calculation strategies.
Definition at line 38 of file LikelihoodGradientWrapper.h.
Public Member Functions | |
LikelihoodGradientWrapper (const LikelihoodGradientWrapper &)=delete | |
virtual | ~LikelihoodGradientWrapper ()=default |
virtual void | fillGradient (double *grad)=0 |
virtual void | fillGradientWithPrevResult (double *grad, double *previous_grad, double *previous_g2, double *previous_gstep)=0 |
virtual bool | isCalculating ()=0 |
Reports whether or not the gradient is currently being calculated. | |
LikelihoodGradientWrapper & | operator= (const LikelihoodGradientWrapper &)=delete |
virtual void | synchronizeParameterSettings (const std::vector< ROOT::Fit::ParameterSettings > ¶meter_settings) |
virtual void | synchronizeParameterSettings (ROOT::Math::IMultiGenFunction *function, const std::vector< ROOT::Fit::ParameterSettings > ¶meter_settings)=0 |
virtual void | synchronizeWithMinimizer (const ROOT::Math::MinimizerOptions &options) |
Synchronize minimizer settings with calculators in child classes. | |
virtual void | updateMinuitExternalParameterValues (const std::vector< double > &minuit_external_x) |
virtual void | updateMinuitInternalParameterValues (const std::vector< double > &minuit_internal_x) |
Minuit passes in parameter values that may not conform to RooFit internal standards (like applying range clipping), but that the specific calculator does need. | |
virtual bool | usesMinuitInternalValues ()=0 |
Implement usesMinuitInternalValues to return true when you want Minuit to send this class Minuit-internal values, or return false when you want "regular" Minuit-external values. | |
Static Public Member Functions | |
static std::unique_ptr< LikelihoodGradientWrapper > | create (LikelihoodGradientMode likelihoodGradientMode, std::shared_ptr< RooAbsL > likelihood, std::shared_ptr< WrapperCalculationCleanFlags > calculationIsClean, std::size_t nDim, RooMinimizer *minimizer, SharedOffset offset) |
Factory method. | |
Protected Member Functions | |
LikelihoodGradientWrapper (std::shared_ptr< RooAbsL > likelihood, std::shared_ptr< WrapperCalculationCleanFlags > calculation_is_clean, std::size_t N_dim, RooMinimizer *minimizer, SharedOffset offset) | |
Protected Attributes | |
std::shared_ptr< WrapperCalculationCleanFlags > | calculation_is_clean_ |
std::shared_ptr< RooAbsL > | likelihood_ |
RooMinimizer * | minimizer_ |
SharedOffset | shared_offset_ |
#include <RooFit/TestStatistics/LikelihoodGradientWrapper.h>
|
protected |
Definition at line 42 of file LikelihoodGradientWrapper.cxx.
|
virtualdefault |
|
delete |
|
static |
Factory method.
Definition at line 70 of file LikelihoodGradientWrapper.cxx.
|
pure virtual |
Implemented in RooFit::TestStatistics::LikelihoodGradientJob.
|
pure virtual |
Implemented in RooFit::TestStatistics::LikelihoodGradientJob.
|
pure virtual |
Reports whether or not the gradient is currently being calculated.
This is used in MinuitFcnGrad to switch between LikelihoodWrapper implementations inside and outside of a LikelihoodGradientJob calculation when the LikelihoodWrapper used is LikelihoodJob. This is to prevent Jobs from being started within Jobs.
Implemented in RooFit::TestStatistics::LikelihoodGradientJob.
|
delete |
|
virtual |
Reimplemented in RooFit::TestStatistics::LikelihoodGradientJob.
Definition at line 55 of file LikelihoodGradientWrapper.cxx.
|
pure virtual |
Implemented in RooFit::TestStatistics::LikelihoodGradientJob.
|
virtual |
Synchronize minimizer settings with calculators in child classes.
Reimplemented in RooFit::TestStatistics::LikelihoodGradientJob.
Definition at line 53 of file LikelihoodGradientWrapper.cxx.
|
virtual |
Definition at line 64 of file LikelihoodGradientWrapper.cxx.
|
virtual |
Minuit passes in parameter values that may not conform to RooFit internal standards (like applying range clipping), but that the specific calculator does need.
This function can be implemented to receive these Minuit-internal values.
Reimplemented in RooFit::TestStatistics::LikelihoodGradientJob.
Definition at line 61 of file LikelihoodGradientWrapper.cxx.
|
pure virtual |
Implement usesMinuitInternalValues to return true when you want Minuit to send this class Minuit-internal values, or return false when you want "regular" Minuit-external values.
Minuit internally uses a transformed parameter space to graciously handle externally mandated parameter range boundaries. Transformation from Minuit-internal to external (i.e. "regular") parameters is done using trigonometric functions that in some cases can cause a few bits of precision loss with respect to the original parameter values. To circumvent this, Minuit also allows external gradient providers (like LikelihoodGradientWrapper) to take the Minuit-internal parameter values directly, without transformation. This way, the gradient provider (e.g. the implementation of this class) can handle transformation manually, possibly with higher precision.
Implemented in RooFit::TestStatistics::LikelihoodGradientJob.
|
protected |
Definition at line 91 of file LikelihoodGradientWrapper.h.
|
protected |
Definition at line 89 of file LikelihoodGradientWrapper.h.
|
protected |
Definition at line 90 of file LikelihoodGradientWrapper.h.
|
protected |
Definition at line 92 of file LikelihoodGradientWrapper.h.