KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
Vector_srw_step< VectorModel > Class Template Reference

#include <sample_vector.h>

Inheritance diagram for Vector_srw_step< VectorModel >:
Basic_mh_step< VectorModel, Mv_gaussian_proposer< VectorModel > > Abstract_mh_step< VectorModel, Mv_gaussian_proposer< VectorModel > >

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< VectorModelrun_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< VectorModeloperator() (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< VectorModelm_proposer
 
double m_temperature
 
bool m_record_extra
 
- Protected Attributes inherited from Abstract_mh_step< VectorModel, Mv_gaussian_proposer< VectorModel > >
boost::optional< VectorModeltmp_model_
 

Detailed Description

template<typename VectorModel>
class Vector_srw_step< VectorModel >

Symmetric-random-walk Metropolis step. Proposals come from a multivariate gaussian distribution.

Template Parameters
VectorModelThe 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

Member Typedef Documentation

template<typename VectorModel >
typedef Base::Proposer Vector_srw_step< VectorModel >::Proposer
template<typename VectorModel >
typedef Vector_srw_step Vector_srw_step< VectorModel >::Self
template<typename VectorModel >
typedef Base::Target_distribution Vector_srw_step< VectorModel >::Target_distribution

Constructor & Destructor Documentation

template<typename VectorModel >
Vector_srw_step< VectorModel >::Vector_srw_step ( const Target_distribution target,
const kjb::Matrix covariance 
)
inline

Creates a Vector_srw_step.

Parameters
log_targetTarget_distribution object used to initialize internal target distribution used in operator().
covarianceCovariance matrix for multi-variate gaussian proposals
template<typename VectorModel >
Vector_srw_step< VectorModel >::Vector_srw_step ( const Target_distribution target,
const kjb::Vector covariance 
)
inline

Creates a Vector_srw_step.

Parameters
log_targetTarget_distribution object used to initialize internal target distribution used in operator().
varianceElements for a diagonal covariance matrix of an independent multivariate gaussian distribution
template<typename VectorModel >
virtual Vector_srw_step< VectorModel >::~Vector_srw_step ( )
inlinevirtual

Member Function Documentation

template<typename VectorModel >
void Vector_srw_step< VectorModel >::set_covariance ( const kjb::Matrix covariance)
inline

Update proposal covariance. This could be an expensive operation, as it will require matrix inversion

template<typename VectorModel >
void Vector_srw_step< VectorModel >::set_covariance ( const kjb::Vector covariance)
inline

The documentation for this class was generated from the following file: