A multi-dimensional conditional probability density function. More...
#include <prob_dens_func.h>
Note that conditional probabilities are typically written , i.e. the probability of
given
, so when sampling the conditional probability density you specify a vector in
(the "input") and get a randomly chosen vector in
(the "output") . O2scl arranges function parameters so that input parameters are first and output parameters are last, thus the first argument to the functions o2scl::prob_cond_mdim::pdf, o2scl::prob_cond_mdim::log_pdf o2scl::prob_cond_mdim::operator()(), and o2scl::prob_cond_mdim::log_metrop_hast is a vector from
as denoted above.
This class is experimental.
Definition at line 1146 of file prob_dens_func.h.
Public Member Functions | |
virtual size_t | dim () const |
The dimensionality. | |
virtual double | pdf (const vec_t &x_B, const vec_t &x_A) const =0 |
The conditional probability. | |
virtual double | log_pdf (const vec_t &x_B, const vec_t &x_A) const =0 |
The log of the conditional probability. | |
virtual void | operator() (const vec_t &x_B, vec_t &x_A) const =0 |
Sample the distribution. | |
virtual double | log_metrop_hast (const vec_t &x_B, vec_t &x_A) const |
Sample the distribution and return the log of the Metropolis-Hastings ratio. More... | |
|
inlinevirtual |
The Metropolis-Hastings ratio for a step beginning at and ending at
is obeys
thus this function computes
and thus this function takes x_B
as input, obtains a sample x_A
and returns the value
To check this, imagine that is independent of the "input" argument, so we have
and then a Metropolis-Hastings step is more likely accepted if is an underestimate.
Definition at line 1191 of file prob_dens_func.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).