Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
ChiSquaredLikelihood.h
Go to the documentation of this file.
1#ifndef CHISQUAREDLIKELIHOOD_H
2#define CHISQUAREDLIKELIHOOD_H
3
4#include <cmath>
5#include <stdexcept>
6#include <vector>
7
8#include "BaseLikelihood.h"
9
10
49public:
61 const ModelFn& model,
62 std::shared_ptr<LikelihoodContext> ctx,
63 std::size_t p_dim,
64 RealMatrix covariance_inv
65 );
66
78 double nll(const std::vector<double>& theta) const override;
79
88 std::size_t dim() const override;
89
99 const std::vector<double>& r
100 ) const override;
101
112 const std::vector<double>& eta
113 ) const override;
114
115private:
116 RealMatrix covariance_inv_;
117};
118
119#endif // CHISQUAREDLIKELIHOOD_H
Concrete profileable likelihood built from a model and joint distributions.
std::function< std::vector< double >(const std::vector< double > &p, const std::vector< double > &eta)> ModelFn
Model function signature used by BaseLikelihood.
Default implementation of a profileable negative log-likelihood.
std::shared_ptr< LikelihoodContext > ctx
Shared statistical context used by the likelihood.
ModelFn model
Model function evaluated by the likelihood.
std::size_t p_dim
Dimension of the fitted-parameter block.
Global chi-square likelihood with no explicit nuisance parameters.
double nll(const std::vector< double > &theta) const override
Evaluates the chi-square negative log-likelihood.
RealMatrix observable_curvature(const std::vector< double > &r) const override
Returns the observable-space curvature matrix.
std::size_t dim() const override
Returns the total optimization dimension.
RealMatrix nuisance_curvature(const std::vector< double > &eta) const override
Returns the nuisance-space curvature matrix.