Defines an interface to calculate log-likelihoods given a set of parameters for an specific model, and assuming that the corresponding datatypes have Gaussian errors. More...

#include "likelihood/likelihood_base.h"

Inheritance diagram for likelihood_base:

Public Member Functions

virtual double operator() (std::vector< double > &x)
 Returns the log-likelihood of a vector of parameters \( \mathbf{x} \).
 
virtual std::vector< double > gradient (std::vector< double > &x, prior &Pr)
 
virtual double chi_squared (std::vector< double > &x)
 Returns the \( \chi^2 \) of a vector of parameters \( \mathbf{x} \).
 
virtual 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.
 
void output_model_data_comparison (std::ostream &out)
 
void output_model_data_comparison (std::string filename)
 

Protected Member Functions

virtual void output (std::ostream &out)
 

Protected Attributes

MPI_Comm _comm
 

Private Member Functions

double step_size (double u)
 

Private Attributes

double _logLikelihood
 
std::vector< double > _xlast
 

Detailed Description

Warning
This class contains multiple purely virtual functions, making it impossible to generate an explicit instantiation.

Member Function Documentation

std::vector< double > gradient ( std::vector< double > &  x,
prior Pr 
)
virtual

Returns the gradient of the log-likelihood of a vector of parameters \( \mathbf{x} \) The prior permits parameter checking if required during likelihood gradient evaluation, through the gradients of the prior is applied elsewhere.

Reimplemented in likelihood_optimal_complex_gain_constrained_crosshand_visibilities, and likelihood_optimal_complex_gain_visibility.

Here is the call graph for this function:

Here is the caller graph for this function:

void output ( std::ostream &  out)
protectedvirtual
void output_model_data_comparison ( std::ostream &  out)

Outputs the data and model, as modified by the likelihood appropriately, to the specified output stream. Useful for comparison later. ASSUMES that only process 0 on _comm is outputting.

Here is the call graph for this function:

void output_model_data_comparison ( std::string  filename)

Outputs the data and model, as modified by the likelihood appropriately, to the specified output file. Useful for comparison later.

Here is the call graph for this function:


The documentation for this class was generated from the following files: