Stan  2.10.0
probability, sampling & optimization
Public Member Functions | Public Attributes | List of all members
stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG > Class Template Reference

Exhaustive Hamiltonian Monte Carlo (XHMC) with multinomial sampling. More...

#include <base_xhmc.hpp>

Inheritance diagram for stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >:
stan::mcmc::base_hmc< Model, Hamiltonian, Integrator, BaseRNG > stan::mcmc::base_mcmc

Public Member Functions

 base_xhmc (const Model &model, BaseRNG &rng)
 
 ~base_xhmc ()
 
void set_max_depth (int d)
 
void set_max_deltaH (double d)
 
void set_x_delta (double d)
 
int get_max_depth ()
 
double get_max_deltaH ()
 
double get_x_delta ()
 
sample transition (sample &init_sample, interface_callbacks::writer::base_writer &info_writer, interface_callbacks::writer::base_writer &error_writer)
 
void get_sampler_param_names (std::vector< std::string > &names)
 
void get_sampler_params (std::vector< double > &values)
 
int build_tree (int depth, ps_point &z_propose, double &ave, double &log_sum_weight, double H0, double sign, int &n_leapfrog, double &sum_metro_prob, interface_callbacks::writer::base_writer &info_writer, interface_callbacks::writer::base_writer &error_writer)
 Recursively build a new subtree to completion or until the subtree becomes invalid. More...
 
- Public Member Functions inherited from stan::mcmc::base_hmc< Model, Hamiltonian, Integrator, BaseRNG >
 base_hmc (const Model &model, BaseRNG &rng)
 
void write_sampler_state (interface_callbacks::writer::base_writer &writer)
 
void get_sampler_diagnostic_names (std::vector< std::string > &model_names, std::vector< std::string > &names)
 
void get_sampler_diagnostics (std::vector< double > &values)
 
void seed (const Eigen::VectorXd &q)
 
void init_hamiltonian (interface_callbacks::writer::base_writer &info_writer, interface_callbacks::writer::base_writer &error_writer)
 
void init_stepsize (interface_callbacks::writer::base_writer &info_writer, interface_callbacks::writer::base_writer &error_writer)
 
Hamiltonian< Model, BaseRNG >::PointType & z ()
 
virtual void set_nominal_stepsize (double e)
 
double get_nominal_stepsize ()
 
double get_current_stepsize ()
 
virtual void set_stepsize_jitter (double j)
 
double get_stepsize_jitter ()
 
void sample_stepsize ()
 
- Public Member Functions inherited from stan::mcmc::base_mcmc
 base_mcmc ()
 
virtual ~base_mcmc ()
 

Public Attributes

int depth_
 
int max_depth_
 
double max_deltaH_
 
double x_delta_
 
int n_leapfrog_
 
int divergent_
 
double energy_
 

Additional Inherited Members

- Protected Attributes inherited from stan::mcmc::base_hmc< Model, Hamiltonian, Integrator, BaseRNG >
Hamiltonian< Model, BaseRNG >::PointType z_
 
Integrator< Hamiltonian< Model, BaseRNG > > integrator_
 
Hamiltonian< Model, BaseRNG > hamiltonian_
 
BaseRNG & rand_int_
 
boost::uniform_01< BaseRNG & > rand_uniform_
 
double nom_epsilon_
 
double epsilon_
 
double epsilon_jitter_
 

Detailed Description

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
class stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >

Exhaustive Hamiltonian Monte Carlo (XHMC) with multinomial sampling.

See http://arxiv.org/abs/1601.00225.

Definition at line 59 of file base_xhmc.hpp.

Constructor & Destructor Documentation

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::base_xhmc ( const Model &  model,
BaseRNG &  rng 
)
inline

Definition at line 61 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::~base_xhmc ( )
inline

Definition at line 67 of file base_xhmc.hpp.

Member Function Documentation

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
int stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::build_tree ( int  depth,
ps_point z_propose,
double &  ave,
double &  log_sum_weight,
double  H0,
double  sign,
int &  n_leapfrog,
double &  sum_metro_prob,
interface_callbacks::writer::base_writer info_writer,
interface_callbacks::writer::base_writer error_writer 
)
inline

Recursively build a new subtree to completion or until the subtree becomes invalid.

Returns validity of the resulting subtree.

Parameters
depthDepth of the desired subtree
z_proposeState proposed from subtree
aveWeighted average of dG/dt across trajectory
log_sum_weightLog of summed weights across trajectory
H0Hamiltonian of initial state
signDirection in time to built subtree
n_leapfrogSummed number of leapfrog evaluations
sum_metro_probSummed Metropolis probabilities across trajectory
info_writerStream for information messages
error_writerStream for error messages

Definition at line 204 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
double stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::get_max_deltaH ( )
inline

Definition at line 84 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
int stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::get_max_depth ( )
inline

Definition at line 83 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
void stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::get_sampler_param_names ( std::vector< std::string > &  names)
inlinevirtual

Reimplemented from stan::mcmc::base_mcmc.

Definition at line 172 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
void stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::get_sampler_params ( std::vector< double > &  values)
inlinevirtual

Reimplemented from stan::mcmc::base_mcmc.

Definition at line 180 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
double stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::get_x_delta ( )
inline

Definition at line 85 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
void stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::set_max_deltaH ( double  d)
inline

Definition at line 74 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
void stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::set_max_depth ( int  d)
inline

Definition at line 69 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
void stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::set_x_delta ( double  d)
inline

Definition at line 78 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
sample stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::transition ( sample init_sample,
interface_callbacks::writer::base_writer info_writer,
interface_callbacks::writer::base_writer error_writer 
)
inlinevirtual

Implements stan::mcmc::base_mcmc.

Definition at line 88 of file base_xhmc.hpp.

Member Data Documentation

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
int stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::depth_

Definition at line 288 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
int stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::divergent_

Definition at line 294 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
double stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::energy_

Definition at line 295 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
double stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::max_deltaH_

Definition at line 290 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
int stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::max_depth_

Definition at line 289 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
int stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::n_leapfrog_

Definition at line 293 of file base_xhmc.hpp.

template<class Model, template< class, class > class Hamiltonian, template< class > class Integrator, class BaseRNG>
double stan::mcmc::base_xhmc< Model, Hamiltonian, Integrator, BaseRNG >::x_delta_

Definition at line 291 of file base_xhmc.hpp.


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

     [ Stan Home Page ] © 2011–2016, Stan Development Team.