KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
kjb::pt::Sample_scenes Class Reference

Use HMC to draw samples from the scene posterior using HMC. More...

#include <pt_sample_scenes.h>

Public Types

enum  Sample_method { HMC, MH }
 
typedef ergo::hmc_step< SceneHmc_step
 
typedef ergo::mh_step< SceneMh_step
 

Public Member Functions

 Sample_scenes (const Scene_posterior &posterior, bool infer_head)
 
const Scene_posteriorscene_posterior () const
 Get posterior distribution. More...
 
void set_scene_posterior (const Scene_posterior &post)
 Set posterior distribution. More...
 
void set_sample_method (Sample_method method)
 Set the sampling method. More...
 
void set_num_iterations (size_t num_its)
 Set the number of iterations and the fraction of HMC steps (vis-a-vis MH steps). More...
 
void set_num_leapfrog_steps (size_t lf_steps)
 Set the number of leapfrog steps. More...
 
void set_hmc_step_size (double pss)
 Set the HMC step sizes. More...
 
void set_gradient_step_size (double pss)
 Set the gradient approximation step sizes. More...
 
void set_size_proposal_sigmas (double hsdv, double wsdv, double gsdv)
 Set the MH proposal sigmas. More...
 
template<class StepIterator , class SampleIterator , class ProposalIterator , class PdIterator >
void operator() (const Scene &initial_scene, boost::optional< StepIterator > step_out, boost::optional< SampleIterator > sample_out, boost::optional< ProposalIterator > proposed_out, boost::optional< PdIterator > pd_out) const
 Sample from the full likelihood. More...
 

Detailed Description

Use HMC to draw samples from the scene posterior using HMC.

Member Typedef Documentation

typedef ergo::hmc_step<Scene> kjb::pt::Sample_scenes::Hmc_step
typedef ergo::mh_step<Scene> kjb::pt::Sample_scenes::Mh_step

Member Enumeration Documentation

Enumerator
HMC 
MH 

Constructor & Destructor Documentation

kjb::pt::Sample_scenes::Sample_scenes ( const Scene_posterior posterior,
bool  infer_head 
)
inline

Member Function Documentation

template<class StepIterator , class SampleIterator , class ProposalIterator , class PdIterator >
void kjb::pt::Sample_scenes::operator() ( const Scene initial_scene,
boost::optional< StepIterator >  step_out,
boost::optional< SampleIterator >  sample_out,
boost::optional< ProposalIterator >  proposed_out,
boost::optional< PdIterator >  pd_out 
) const

Sample from the full likelihood.

const Scene_posterior& kjb::pt::Sample_scenes::scene_posterior ( ) const
inline

Get posterior distribution.

void kjb::pt::Sample_scenes::set_gradient_step_size ( double  pss)
inline

Set the gradient approximation step sizes.

void kjb::pt::Sample_scenes::set_hmc_step_size ( double  pss)
inline

Set the HMC step sizes.

void kjb::pt::Sample_scenes::set_num_iterations ( size_t  num_its)
inline

Set the number of iterations and the fraction of HMC steps (vis-a-vis MH steps).

void kjb::pt::Sample_scenes::set_num_leapfrog_steps ( size_t  lf_steps)
inline

Set the number of leapfrog steps.

void kjb::pt::Sample_scenes::set_sample_method ( Sample_method  method)
inline

Set the sampling method.

void kjb::pt::Sample_scenes::set_scene_posterior ( const Scene_posterior post)
inline

Set posterior distribution.

void kjb::pt::Sample_scenes::set_size_proposal_sigmas ( double  hsdv,
double  wsdv,
double  gsdv 
)
inline

Set the MH proposal sigmas.


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