Defines the combined likelihood class.
More...
#include "likelihood/likelihood.h"
|
| likelihood (std::vector< prior_base * > P, std::vector< transform_base * > T, std::vector< likelihood_base * > L, std::vector< double > &W) |
| Likelihood class constructor.
|
|
| likelihood (std::vector< prior_base * > P, std::vector< likelihood_base * > L, std::vector< double > &W) |
| Likelihood class constructor.
|
|
| ~likelihood () |
| Likelihood class destructor.
|
|
virtual double | operator() (std::vector< double > &) |
|
virtual std::vector< double > | gradient (std::vector< double > &) |
| Gradient operator.
|
|
void | forward_transform (std::vector< double > &) |
|
double | chi_squared (std::vector< double > &) |
| Returns the chi squared evaluated at a vector in the parameter space.
|
|
bool | transform_state () |
|
void | use_finite_difference_gradients () |
| Set the likelihood to use finite differences in the gradient computation.
|
|
void | use_intrinsic_likelihood_gradients () |
| Set the likelihood to use the intrinsic likelihood gradients in the gradient computation.
|
|
std::vector< prior_base * > | priors () |
| Returns access to the prior vector.
|
|
std::vector< transform_base * > | transforms () |
| Returns access to the transform vector.
|
|
std::vector< likelihood_base * > | likelihoods () |
| Returns access to the base likelihood vector.
|
|
std::vector< double > & | weights () |
| Returns access to the weights vector.
|
|
void | set_mpi_communicator (MPI_Comm comm) |
|
void | output_1d_slice (std::string fname, std::vector< double > p1, std::vector< double > p2, double xmin=-1, double xmax=2, size_t Nx=128) |
| Output along a line.
|
|
void | output_2d_slice (std::string fname, std::vector< double > p1, std::vector< double > p2, std::vector< double > p3, double xmin=-1, double xmax=2, size_t Nx=128, double ymin=-1, double ymax=2, size_t Ny=128) |
| Output a surface.
|
|
|
double | step_size (double u) |
|
Defines the combined likelihood class. This class combines different likelihoods into a single likelihood used by the samplers. It also contains the priors on all the parameters and the optional parameter transformations.
void forward_transform |
( |
std::vector< double > & |
x | ) |
|
Forward transformation function. It applies the parameter trasformations supplied to the constructor on the corresponding parameters
double operator() |
( |
std::vector< double > & |
x | ) |
|
|
virtual |
Overloaded parenthesis operator that returns the log-likelihood of a vector in the parameter space at which the likelihood is to be calculated
Reimplemented in likelihood_power_tempered.
void set_mpi_communicator |
( |
MPI_Comm |
comm | ) |
|
Defines a set of processors provided to the model for parallel computation via an MPI communicator. Only facilates code parallelization if the model computation is parallelized via MPI.
Returns a boolean flag, "true" indicates that coordinate transformations are supplied to be carried on and "false" indicates no parameter transformation is performed
bool _is_transform_provided |
|
private |
Boolean variable, "true" indicates that coordinate transformations are supplied to be carried on and "false" indicates no parameter transformation is performed
A vector of pointers to likelihood objects, these are the individual likelihoods that combine to make the total likelihood
A vector of pointers to prior objects, these are the priors on each parameter in the parameter space
A vector of pointers to transformation objects, these are the coordinate transformations on each parameter in the parameter space
bool _use_finite_difference_gradients |
|
private |
Boolean switch to force full finite difference gradient computation at the combined likelihood level. If model evaluation is the limiting factor in gradient times and there are not major efficiencies to be found in the individual likelihoods, this should be set.
A vector of likelihood weights, these are the weights of individual likelihoods in the final combined likelihood
A vector in the parameter space, this is the transformed parameter vector if parameter transformations are supplied, otherwise it's the original vector of parameters
The documentation for this class was generated from the following files: