|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Decorates a likelihood with Gaussian constraints on selected parameters. More...
#include <WithGaussianConstraints.h>


Public Member Functions | |
| WithGaussianConstraints (std::shared_ptr< ILikelihood > base, std::shared_ptr< JointDistribution > constraints_dist, std::vector< std::size_t > constrained_params) | |
| Constructs a constrained likelihood wrapper. | |
| double | nll (const std::vector< double > &theta) const override |
| Evaluates the constrained negative log-likelihood. | |
| std::vector< fit_app::ParameterDefinition > | get_param_defs () const override |
| Returns the metadata describing the likelihood parameters. | |
| std::size_t | dim () const override |
| Returns the total dimension of the parameter vector. | |
Public Member Functions inherited from ILikelihood | |
| virtual | ~ILikelihood ()=default |
| Virtual destructor for safe polymorphic deletion. | |
Decorates a likelihood with Gaussian constraints on selected parameters.
The class is useful when a profile or projection should keep some parameters weakly constrained around a fitted central value. For a full parameter vector 
![\[
\mathrm{NLL}_{\mathrm{total}}(\theta)
= \mathrm{NLL}_{\mathrm{base}}(\theta)
- \log p_{\mathrm{constraint}}(\theta_{I}),
\]](form_63.png)
where 
Definition at line 37 of file WithGaussianConstraints.h.
| WithGaussianConstraints::WithGaussianConstraints | ( | std::shared_ptr< ILikelihood > | base, |
| std::shared_ptr< JointDistribution > | constraints_dist, | ||
| std::vector< std::size_t > | constrained_params | ||
| ) |
Constructs a constrained likelihood wrapper.
| base | Base likelihood to evaluate first. |
| constraints_dist | Joint distribution defining the Gaussian prior-like constraint on the selected parameters. |
| constrained_params | Indices of the full parameter-vector components passed to constraints_dist, in distribution order. |
Definition at line 3 of file WithGaussianConstraints.cpp.
|
overridevirtual |
Returns the total dimension of the parameter vector.
Implements ILikelihood.
Definition at line 29 of file WithGaussianConstraints.cpp.
|
overridevirtual |
Returns the metadata describing the likelihood parameters.
The returned definitions are expected to follow the same ordering as the parameter vector accepted by nll.
Implements ILikelihood.
Definition at line 25 of file WithGaussianConstraints.cpp.
|
overridevirtual |
Evaluates the constrained negative log-likelihood.
The returned value is the sum of the base NLL and the constraint penalty 
| theta | Full parameter vector passed to the base likelihood. |
| std::out_of_range | if a constrained parameter index is outside theta. |
| std::exception | forwarded from the base likelihood or constraint distribution. |
Implements ILikelihood.
Definition at line 12 of file WithGaussianConstraints.cpp.