KJB
|
#include <sample_vector.h>
Public Types | |
typedef Basic_mh_step < VectorModel, Mv_gaussian_proposer < VectorModel > > | Base |
typedef Vector_srw_step | Self |
typedef Base::Target_distribution | Target_distribution |
typedef Base::Proposer | Proposer |
Public Types inherited from Basic_mh_step< VectorModel, Mv_gaussian_proposer< VectorModel > > | |
typedef Abstract_mh_step < VectorModel, Mv_gaussian_proposer < VectorModel > > | Parent |
typedef Parent::Target_distribution | Target_distribution |
typedef Mv_gaussian_proposer < VectorModel > | Proposer |
Public Types inherited from Abstract_mh_step< VectorModel, Mv_gaussian_proposer< VectorModel > > | |
typedef Model_evaluator < VectorModel >::Type | Target_distribution |
Public Member Functions | |
Vector_srw_step (const Target_distribution &target, const kjb::Matrix &covariance) | |
Creates a Vector_srw_step. More... | |
Vector_srw_step (const Target_distribution &target, const kjb::Vector &covariance) | |
Creates a Vector_srw_step. More... | |
void | set_covariance (const kjb::Matrix &covariance) |
void | set_covariance (const kjb::Vector &covariance) |
virtual | ~Vector_srw_step () |
Public Member Functions inherited from Basic_mh_step< VectorModel, Mv_gaussian_proposer< VectorModel > > | |
Basic_mh_step (const Target_distribution &log_target, const Mv_gaussian_proposer< VectorModel > &proposer) | |
Initializes target and proposer functors (or functions) to the given arguments. More... | |
virtual | ~Basic_mh_step () |
Initializes target and proposer functors (or functions) to the given arguments. More... | |
virtual Mh_proposal_result | propose (const VectorModel &m, VectorModel &m_p) const |
Assignment. More... | |
virtual double | l_target (const VectorModel &m) const |
Evaluate the log-target distribution for the given model. More... | |
void | set_target (const Target_distribution &target) |
void | record_extra (bool enable) |
void | set_temperature (double T) |
virtual double | get_temperature () const |
Public Member Functions inherited from Abstract_mh_step< VectorModel, Mv_gaussian_proposer< VectorModel > > | |
BOOST_CONCEPT_ASSERT ((BaseModel< VectorModel >)) | |
Step_log< VectorModel > | run_step (VectorModel &m, double lt_m, double &accept_prob, boost::optional< VectorModel & > proposed_state_out=boost::none) const |
Runs a step of Metropolis-Hastings on a model m. More... | |
virtual Step_log< VectorModel > | operator() (VectorModel &m, double lt_m) const |
Runs a step of Metropolis-Hastings on a model m. More... | |
virtual | ~Abstract_mh_step () |
virtual void | on_accept () const |
virtual void | on_reject () const |
Additional Inherited Members | |
Protected Member Functions inherited from Basic_mh_step< VectorModel, Mv_gaussian_proposer< VectorModel > > | |
virtual bool | record_extra () const |
Mv_gaussian_proposer < VectorModel > & | get_proposer_ () |
Protected Attributes inherited from Basic_mh_step< VectorModel, Mv_gaussian_proposer< VectorModel > > | |
Target_distribution | m_log_target |
Mv_gaussian_proposer< VectorModel > | m_proposer |
double | m_temperature |
bool | m_record_extra |
Protected Attributes inherited from Abstract_mh_step< VectorModel, Mv_gaussian_proposer< VectorModel > > | |
boost::optional< VectorModel > | tmp_model_ |
Symmetric-random-walk Metropolis step. Proposals come from a multivariate gaussian distribution.
VectorModel | The model type. Must comply with VectorModel concept; i.e.,. must have [] and .size() defined and its elements must be convertible to and from double. |
Vector_srw_step is a functor that runs a single step of symmetric random walk Metropolis on a vector model
typedef Basic_mh_step<VectorModel, Mv_gaussian_proposer<VectorModel> > Vector_srw_step< VectorModel >::Base |
typedef Base::Proposer Vector_srw_step< VectorModel >::Proposer |
typedef Vector_srw_step Vector_srw_step< VectorModel >::Self |
typedef Base::Target_distribution Vector_srw_step< VectorModel >::Target_distribution |
|
inline |
Creates a Vector_srw_step.
log_target | Target_distribution object used to initialize internal target distribution used in operator(). |
covariance | Covariance matrix for multi-variate gaussian proposals |
|
inline |
Creates a Vector_srw_step.
log_target | Target_distribution object used to initialize internal target distribution used in operator(). |
variance | Elements for a diagonal covariance matrix of an independent multivariate gaussian distribution |
|
inlinevirtual |
|
inline |
Update proposal covariance. This could be an expensive operation, as it will require matrix inversion
|
inline |