|
fmcs
v0.2.1
|
Metropolis Hastings using the prior distribution as the proposal. More...
#include "base.hpp"
Public Member Functions | |
| V | operator() (I &input) |
| void | step (record_t< DTypes< Ts... >> &r, I &input) |
Public Member Functions inherited from Inference< AncestorMetropolis, I, O, V, Q, Ts... > | |
| Inference (pp_t< I, O, Ts... > f, Q< V, O, Ts... > &queryer, inf_options_t opts) | |
| std::enable_if_t< std::is_same_v< typename has_proposal< G >::type, No >, V > | operator() (I &input) |
| Runs the specified inference algorithm with the specified queryer. More... | |
| std::enable_if_t< std::is_same_v< typename has_proposal< G >::type, Endog >, V > | operator() (I &input, endog_proposal_t< Ts... > &proposal) |
| Runs the specified inference algorithm with the specified queryer using the specified proposal distribution. More... | |
| std::enable_if_t< std::is_same_v< typename has_proposal< G >::type, Exog >, V > | operator() (I &input, exog_proposal_t< I, Ts... > &proposal) |
| Runs the specified inference algorithm with the specified queryer using the specified proposal distribution. More... | |
| void | step (record_t< DTypes< Ts... >> &r, I &input) |
Additional Inherited Members | |
Public Attributes inherited from Inference< AncestorMetropolis, I, O, V, Q, Ts... > | |
| pp_t< I, O, Ts... > | f |
| inf_options_t | opts |
| Q< V, O, Ts... > & | queryer |
| inference_state< AncestorMetropolis, I, O, Ts... > | state |
Metropolis Hastings using the prior distribution as the proposal.
Suppose the generative model factors as \( p(x,z) = p(x|z)p(z) \). The acceptance ratio is \( \log \alpha = \log p(x|z') - \log p(x|z) \), where \( z' \sim p(z) \) is the new draw from the prior, and \( z \sim p(z) \) is the old/existing draw from the prior. Each weight passed to the queryer is \( \log w = 0 \).
| I | The input type of the program on which to perform inference |
| O | The output type of the program on which to perform inference |
| V | The type emitted by the queryer |
| Q | The queryer type |
| Ts | The distribution types used in the probabilistic program |