|
Doxygen
1.9.1
|
Implements likelihood under the assumption of isotropic white noise. More...
#include <tsgDreamLikelyGaussian.hpp>


Public Member Functions | |
| LikelihoodGaussIsotropic () | |
| Default constructor for convenience, an object constructed with the default cannot be used until setData() is called. | |
| LikelihoodGaussIsotropic (double variance, const std::vector< double > &data_mean, size_t num_observe=1) | |
| Constructs the class and calls setData(). | |
| ~LikelihoodGaussIsotropic ()=default | |
| Default destructor. | |
| void | setData (double variance, const std::vector< double > &data_mean, size_t num_observe=1) |
| Set the noise magnitude (varaince) the observed data (data_mean) and number of observations (num_observe). More... | |
| void | getLikelihood (TypeSamplingForm form, const std::vector< double > &model, std::vector< double > &likely) const override final |
| Compute the likelihood of a set of model outputs. | |
| void | getLikelihood (TypeSamplingForm form, double const model[], int num_samples, double likely[]) const override final |
| Overload for raw-arrays, for interface purposes mostly, e.g., python. | |
| int | getNumOutputs () const override |
| Returns the size of the data_mean vector (for error checking purposes). | |
| void | write (std::ostream &os, int outputs_begin=0, int outputs_end=-1) const |
| Writes the data for a portion of the outputs into a stream. More... | |
| void | read (std::istream &is) |
| Reads the data from a stream, assumes write() has been used first. | |
Public Member Functions inherited from TasDREAM::TasmanianLikelihood | |
| TasmanianLikelihood () | |
| Empty default constructor. | |
| virtual | ~TasmanianLikelihood () |
| Empty virtual destructor. | |
| virtual | operator std::function< void (TypeSamplingForm, const std::vector< double > &, std::vector< double > &)>() const |
| Automatically convert the likelihood into input for TasDREAM::posterior(). | |
Implements likelihood under the assumption of isotropic white noise.
| void TasDREAM::LikelihoodGaussIsotropic::setData | ( | double | variance, |
| const std::vector< double > & | data_mean, | ||
| size_t | num_observe = 1 |
||
| ) |
Set the noise magnitude (varaince) the observed data (data_mean) and number of observations (num_observe).
Set the parameters of the likelihood.
| variance | must be a positive number indicating the magnitude of the noise. |
| data_mean | must have the same size as the number of model outputs and hold the average of all measurements. |
| num_observe | must be a positive integer indicating the number of samples. |
|
inline |
Writes the data for a portion of the outputs into a stream.
The likelihood object does not store the raw inputs to setData(), instead optimized data-structures are used. This method writes either entire likelihood or the optimized data for a portion of the outputs.
| os | is the stream where the data will be written. |
| outputs_begin | is the first output to include in the write process. |
| outputs_end | is one more than the last output to write, use -1 to indicate all outputs after output_begin. |
This method is used by the MPI scatter likelihood template.