template<class Model>
class Posterior< Model >
Generic posterior class.
This class represents an un-normalized log-posterior class, which is composed of the sum of the log-prior and log-likelihood.
This class offers a "short circuiting" feature in which the likelihood is not evaluated where the prior is zero; in this way, the prior may "protect" the likelihood from invalid values that would result in an error.
template<class Model >
void Posterior< Model >::set_annealing_compensation |
( |
double |
temperature | ) |
|
|
inline |
If this posterior is to be used in simulated annealing, often it is desirable to only apply annealing to the likelihood function. Since annealing by default is applied to the entire target distribution, this function allows you to set a "compensation factor" which will cancel-out the affect of annealing on the prior, resulting in only the likelihood being annealed.
You can pass this as a callback to Annealing_sampler's add_temperature_changed_callback() so it is updated every time the temperature changes.