Struct NutsHamiltonianMonteCarloWalk

struct NutsHamiltonianMonteCarloWalk
template<typename NT, typename OracleFunctor>
struct parameters

Public Functions

inline parameters(OracleFunctor const &F, unsigned int dim, NT epsilon_ = 2)

Public Members

NT epsilon
NT eta
template<typename Point, typename Polytope, typename RandomNumberGenerator, typename NegativeGradientFunctor, typename NegativeLogprobFunctor, typename Solver>
struct Walk

Public Types

typedef std::vector<Point> pts
typedef Point::FT NT
typedef std::vector<Polytope*> bounds

Public Functions

inline Walk(Polytope *P, Point &p, NegativeGradientFunctor &neg_grad_f, NegativeLogprobFunctor &neg_logprob_f, parameters<NT, NegativeGradientFunctor> &param, bool burn_in_phase = true)
inline void burnin(RandomNumberGenerator &rng, unsigned int N = 1000, unsigned int walk_length = 1)
inline void apply(RandomNumberGenerator &rng, unsigned int walk_length = 1, bool burnin = false)
inline NT hamiltonian(Point &pos, Point &vel) const
inline NT get_eta_solver()
inline void disable_adaptive()
inline void enable_adaptive()
inline void reset_num_runs()
inline NT get_ratio_acceptance()

Public Members

parameters<NT, NegativeGradientFunctor> &params
Solver *solver
unsigned int dim
long num_runs = 0
long total_acceptance = 0
NT average_acceptance = 0
Point x
Point v
Point v_pl
Point v_min
Point v_min_j
Point v_pl_j
Point X_pl
Point X_pl_j
Point X_min
Point X
Point X_rnd_j
Point X_min_j
Point x_pl_min
NegativeGradientFunctor &F
bool accepted
NT eps_step
NT mu
NT log_tilde_eps
NT H_tilde
NT alpha
NT na
const NT delta = NT(0.65)
const NT Delta_max = NT(1000)
const NT gamma = NT(0.05)
const NT t0 = NT(10)
const NT kk = NT(0.85)
NegativeLogprobFunctor &f