BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
namespace defining utility free functions using in Fit for evaluating the various fit method functions (chi2, likelihood, etc..) given the data and the model function
Classes | |
struct | Evaluate |
class | IntegralEvaluator |
class | LikelihoodAux |
class | LikelihoodAux< double > |
Typedefs | |
typedef ROOT::Math::IParamMultiGradFunction | IGradModelFunction |
template<class T > | |
using | IGradModelFunctionTempl = ROOT::Math::IParamMultiGradFunctionTempl< T > |
typedef ROOT::Math::IParamMultiFunction | IModelFunction |
template<class T > | |
using | IModelFunctionTempl = ROOT::Math::IParamMultiFunctionTempl< T > |
Functions | |
double | EvaluateChi2 (const IModelFunction &func, const BinData &data, const double *x, unsigned int &nPoints, ROOT::Fit::ExecutionPolicy executionPolicy, unsigned nChunks=0) |
double | EvaluateChi2Effective (const IModelFunction &func, const BinData &data, const double *x, unsigned int &nPoints) |
void | EvaluateChi2Gradient (const IModelFunction &func, const BinData &data, const double *x, double *grad, unsigned int &nPoints, ROOT::Fit::ExecutionPolicy executionPolicy=ROOT::Fit::ExecutionPolicy::kSerial, unsigned nChunks=0) |
double | EvaluateChi2Residual (const IModelFunction &func, const BinData &data, const double *x, unsigned int ipoint, double *g=0) |
double | EvaluateLogL (const IModelFunction &func, const UnBinData &data, const double *p, int iWeight, bool extended, unsigned int &nPoints, ROOT::Fit::ExecutionPolicy executionPolicy, unsigned nChunks=0) |
void | EvaluateLogLGradient (const IModelFunction &func, const UnBinData &data, const double *x, double *grad, unsigned int &nPoints, ROOT::Fit::ExecutionPolicy executionPolicy=ROOT::Fit::ExecutionPolicy::kSerial, unsigned nChunks=0) |
double | EvaluatePdf (const IModelFunction &func, const UnBinData &data, const double *x, unsigned int ipoint, double *g=0) |
double | EvaluatePoissonBinPdf (const IModelFunction &func, const BinData &data, const double *x, unsigned int ipoint, double *g=0) |
double | EvaluatePoissonLogL (const IModelFunction &func, const BinData &data, const double *x, int iWeight, bool extended, unsigned int &nPoints, ROOT::Fit::ExecutionPolicy executionPolicy, unsigned nChunks=0) |
void | EvaluatePoissonLogLGradient (const IModelFunction &func, const BinData &data, const double *x, double *grad, unsigned int &nPoints, ROOT::Fit::ExecutionPolicy executionPolicy=ROOT::Fit::ExecutionPolicy::kSerial, unsigned nChunks=0) |
unsigned | setAutomaticChunking (unsigned nEvents) |
using ROOT::Fit::FitUtil::IGradModelFunctionTempl = typedef ROOT::Math::IParamMultiGradFunctionTempl<T> |
using ROOT::Fit::FitUtil::IModelFunctionTempl = typedef ROOT::Math::IParamMultiFunctionTempl<T> |
double ROOT::Fit::FitUtil::EvaluateChi2 | ( | const IModelFunction & | func, |
const BinData & | data, | ||
const double * | x, | ||
unsigned int & | nPoints, | ||
ROOT::Fit::ExecutionPolicy | executionPolicy, | ||
unsigned | nChunks = 0 |
||
) |
Chi2 Functions evaluate the Chi2 given a model function and the data at the point x. return also nPoints as the effective number of used points in the Chi2 evaluation
Referenced by ROOT::Fit::FitUtil::Evaluate< T >::EvalChi2().
double ROOT::Fit::FitUtil::EvaluateChi2Effective | ( | const IModelFunction & | func, |
const BinData & | data, | ||
const double * | x, | ||
unsigned int & | nPoints | ||
) |
evaluate the effective Chi2 given a model function and the data at the point x. The effective chi2 uses the errors on the coordinates : W = 1/(sigma_y**2 + ( sigma_x_i * df/dx_i )**2 ) return also nPoints as the effective number of used points in the Chi2 evaluation
Referenced by ROOT::Fit::FitUtil::Evaluate< T >::EvalChi2Effective().
void ROOT::Fit::FitUtil::EvaluateChi2Gradient | ( | const IModelFunction & | func, |
const BinData & | data, | ||
const double * | x, | ||
double * | grad, | ||
unsigned int & | nPoints, | ||
ROOT::Fit::ExecutionPolicy | executionPolicy = ROOT::Fit::ExecutionPolicy::kSerial , |
||
unsigned | nChunks = 0 |
||
) |
evaluate the Chi2 gradient given a model function and the data at the point x. return also nPoints as the effective number of used points in the Chi2 evaluation
Referenced by ROOT::Fit::FitUtil::Evaluate< T >::EvalChi2Gradient().
double ROOT::Fit::FitUtil::EvaluateChi2Residual | ( | const IModelFunction & | func, |
const BinData & | data, | ||
const double * | x, | ||
unsigned int | ipoint, | ||
double * | g = 0 |
||
) |
evaluate the residual contribution to the Chi2 given a model function and the BinPoint data and if the pointer g is not null evaluate also the gradient of the residual. If the function provides parameter derivatives they are used otherwise a simple derivative calculation is used
Referenced by ROOT::Fit::FitUtil::Evaluate< T >::EvalChi2Residual().
double ROOT::Fit::FitUtil::EvaluateLogL | ( | const IModelFunction & | func, |
const UnBinData & | data, | ||
const double * | p, | ||
int | iWeight, | ||
bool | extended, | ||
unsigned int & | nPoints, | ||
ROOT::Fit::ExecutionPolicy | executionPolicy, | ||
unsigned | nChunks = 0 |
||
) |
evaluate the LogL given a model function and the data at the point x. return also nPoints as the effective number of used points in the LogL evaluation
Referenced by ROOT::Fit::FitUtil::Evaluate< T >::EvalLogL().
void ROOT::Fit::FitUtil::EvaluateLogLGradient | ( | const IModelFunction & | func, |
const UnBinData & | data, | ||
const double * | x, | ||
double * | grad, | ||
unsigned int & | nPoints, | ||
ROOT::Fit::ExecutionPolicy | executionPolicy = ROOT::Fit::ExecutionPolicy::kSerial , |
||
unsigned | nChunks = 0 |
||
) |
evaluate the LogL gradient given a model function and the data at the point x. return also nPoints as the effective number of used points in the LogL evaluation
Referenced by ROOT::Fit::FitUtil::Evaluate< T >::EvalLogLGradient().
double ROOT::Fit::FitUtil::EvaluatePdf | ( | const IModelFunction & | func, |
const UnBinData & | data, | ||
const double * | x, | ||
unsigned int | ipoint, | ||
double * | g = 0 |
||
) |
evaluate the pdf contribution to the LogL given a model function and the BinPoint data. If the pointer g is not null evaluate also the gradient of the pdf. If the function provides parameter derivatives they are used otherwise a simple derivative calculation is used
Referenced by ROOT::Fit::LogLikelihoodFCN< DerivFunType, ModelFunType >::DataElement().
double ROOT::Fit::FitUtil::EvaluatePoissonBinPdf | ( | const IModelFunction & | func, |
const BinData & | data, | ||
const double * | x, | ||
unsigned int | ipoint, | ||
double * | g = 0 |
||
) |
evaluate the pdf contribution to the Poisson LogL given a model function and the BinPoint data. If the pointer g is not null evaluate also the gradient of the Poisson pdf. If the function provides parameter derivatives they are used otherwise a simple derivative calculation is used
Referenced by ROOT::Fit::FitUtil::Evaluate< T >::EvalPoissonBinPdf().
double ROOT::Fit::FitUtil::EvaluatePoissonLogL | ( | const IModelFunction & | func, |
const BinData & | data, | ||
const double * | x, | ||
int | iWeight, | ||
bool | extended, | ||
unsigned int & | nPoints, | ||
ROOT::Fit::ExecutionPolicy | executionPolicy, | ||
unsigned | nChunks = 0 |
||
) |
evaluate the Poisson LogL given a model function and the data at the point x. return also nPoints as the effective number of used points in the LogL evaluation By default is extended, pass extedend to false if want to be not extended (MultiNomial)
Referenced by ROOT::Fit::FitUtil::Evaluate< T >::EvalPoissonLogL().
void ROOT::Fit::FitUtil::EvaluatePoissonLogLGradient | ( | const IModelFunction & | func, |
const BinData & | data, | ||
const double * | x, | ||
double * | grad, | ||
unsigned int & | nPoints, | ||
ROOT::Fit::ExecutionPolicy | executionPolicy = ROOT::Fit::ExecutionPolicy::kSerial , |
||
unsigned | nChunks = 0 |
||
) |
evaluate the Poisson LogL given a model function and the data at the point x. return also nPoints as the effective number of used points in the LogL evaluation
Referenced by ROOT::Fit::FitUtil::Evaluate< T >::EvalPoissonLogLGradient().
unsigned ROOT::Fit::FitUtil::setAutomaticChunking | ( | unsigned | nEvents | ) |