#include <mcmc.hpp>
Inheritance diagram for Arak::MarkovChain< MarkovChainTraits >:


Definition at line 13 of file mcmc.hpp.
Public Types | |
| typedef MarkovChainTraits::StateType | StateType |
| typedef MarkovChainTraits::DistributionType | DistributionType |
| typedef MarkovChainTraits::ProposalType | ProposalType |
| typedef MarkovChainTraits::MoveType | MoveType |
Public Member Functions | |
| MarkovChain (DistributionType &dist, ProposalType &proposal, StateType &state, const Arak::Util::PropertyMap &props, Arak::Util::Random &random=Arak::Util::default_random) | |
| Default constructor. | |
| const StateType & | getState () const |
| Returns a const reference to the current state of the Markov chain. | |
| double | getLogLikelihood () const |
| Returns the log likelihood of the current state. | |
| StateType & | getState () |
| Returns a mutable reference to the current state of the Markov chain. | |
| const DistributionType & | getDistribution () const |
| Returns a const reference to the chain's stationary measure. | |
| virtual bool | advance () |
| Advances the Markov chain using a Metropolis-Hastings step. | |
| unsigned long int | getNumSteps () const |
| Returns the number of times advance() has been called. | |
| unsigned long int | getNumSamples () const |
| Returns the number of samples generated by this Markov chain. | |
| bool | isSample () const |
| Returns true if the current state of the Markov chain is a sample. | |
| unsigned long int | getNumMoves () const |
| Returns the number of times the state of the Markov chain has changed. | |
| double | acceptance () const |
| Returns the proportion of accepted moves. | |
Protected Attributes | |
| Arak::Util::Random & | random |
| A source of pseudorandomness. | |
| DistributionType & | dist |
| The distribution sampled by this Markov chain. | |
| ProposalType & | proposal |
| The proposal distribution used by this Markov chain. | |
| StateType & | state |
| The current state of the Markov chain. | |
| double | logLikelihood |
| The log likelihood of the current state. | |
| unsigned long int | numSteps |
| The number of times advance() has been called. | |
| unsigned long int | numMoves |
| The number of changes to the state of the Markov chain. | |
| unsigned int | burnIn |
| The number of initial samples to discard. | |
| unsigned int | stride |
| The number of steps to discard in between samples. | |
|
|||||
|
Reimplemented in Arak::AnnealedMarkovChain< MarkovChainTraits >, and Arak::StochasticHillClimber< MarkovChainTraits >. |
|
|||||
|
Reimplemented in Arak::AnnealedMarkovChain< MarkovChainTraits >, and Arak::StochasticHillClimber< MarkovChainTraits >. |
|
|||||
|
Reimplemented in Arak::AnnealedMarkovChain< MarkovChainTraits >, and Arak::StochasticHillClimber< MarkovChainTraits >. |
|
|||||
|
Reimplemented in Arak::AnnealedMarkovChain< MarkovChainTraits >, and Arak::StochasticHillClimber< MarkovChainTraits >. |
|
||||||||||||||||||||||||||||
|
Default constructor. Given a stationary distribution, a proposal distribution, and an initial state, this builds a new Markov chain.
|
|
|||||||||
|
Returns the proportion of accepted moves.
Definition at line 203 of file mcmc.hpp. Referenced by sampler(). |
|
|||||||||
|
Advances the Markov chain using a Metropolis-Hastings step. This method returns truth if the proposed move was accepted.
Reimplemented in Arak::AnnealedMarkovChain< MarkovChainTraits >, and Arak::StochasticHillClimber< MarkovChainTraits >. |
|
|||||||||
|
Returns a const reference to the chain's stationary measure.
|
|
|||||||||
|
Returns the log likelihood of the current state.
|
|
|||||||||
|
Returns the number of times the state of the Markov chain has changed.
Definition at line 198 of file mcmc.hpp. Referenced by sampler(). |
|
|||||||||
|
Returns the number of samples generated by this Markov chain. This is the number of steps divided by the stride, minus the burn-in. Definition at line 180 of file mcmc.hpp. Referenced by Arak::PointColorEstimator::estimate(), Arak::MarkovChain< ArakMarkovChainTraits >::isSample(), Arak::PointColorEstimator::recolor(), Arak::GridColorEstimator::write(), and Arak::PointSetColorEstimator::write(). |
|
|||||||||
|
Returns the number of times advance() has been called.
Definition at line 173 of file mcmc.hpp. Referenced by sampler(). |
|
|||||||||
|
Returns a mutable reference to the current state of the Markov chain.
|
|
|||||||||
|
Returns a const reference to the current state of the Markov chain.
Definition at line 111 of file mcmc.hpp. Referenced by Arak::GridColorEstimator::GridColorEstimator(), Arak::PointSetColorEstimator::PointSetColorEstimator(), and sampler(). |
|
|||||||||
|
Returns true if the current state of the Markov chain is a sample.
|
|
|||||
|
The number of initial samples to discard.
|
|
|||||
|
The distribution sampled by this Markov chain.
|
|
|||||
|
The log likelihood of the current state.
|
|
|||||
|
The number of changes to the state of the Markov chain.
|
|
|||||
|
The number of times advance() has been called.
|
|
|||||
|
The proposal distribution used by this Markov chain.
|
|
|||||
|
A source of pseudorandomness.
|
|
|||||
|
The current state of the Markov chain.
|
|
|||||
|
The number of steps to discard in between samples.
|
1.3.6