autoppl  v0.8
A C++ template library for probabilistic programming
ppl::mcmc::StepAdapter Struct Reference

#include <step_adapter.hpp>

Public Member Functions

 StepAdapter (double _log_eps)
 
void init (double _log_eps)
 
void adapt (double alpha_ratio)
 
void reset ()
 

Public Attributes

size_t counter = 0
 
double log_eps = 0.
 
double log_eps_bar = 0.
 
double H_bar = 0.
 
double mu = 0.
 
const double mu_constant = std::log(10)
 
StepConfig step_config
 

Detailed Description

Adaptive values in NUTS algorithm using dual-averaging. Currently, only log_eps, log_eps_bar, and H_bar are adaptive.

Constructor & Destructor Documentation

◆ StepAdapter()

ppl::mcmc::StepAdapter::StepAdapter ( double  _log_eps)
inline

Constructs a step adapter with the given log epsilon. Initializes mu to log(10*_log_eps).

Member Function Documentation

◆ adapt()

void ppl::mcmc::StepAdapter::adapt ( double  alpha_ratio)
inline

Adapts log_eps, log_eps_bar, and H_bar.

◆ init()

void ppl::mcmc::StepAdapter::init ( double  _log_eps)
inline

Must be called before beginning to adapt.

◆ reset()

void ppl::mcmc::StepAdapter::reset ( )
inline

Reset all variables that change per iteration

Member Data Documentation

◆ counter

size_t ppl::mcmc::StepAdapter::counter = 0

◆ H_bar

double ppl::mcmc::StepAdapter::H_bar = 0.

◆ log_eps

double ppl::mcmc::StepAdapter::log_eps = 0.

◆ log_eps_bar

double ppl::mcmc::StepAdapter::log_eps_bar = 0.

◆ mu

double ppl::mcmc::StepAdapter::mu = 0.

◆ mu_constant

const double ppl::mcmc::StepAdapter::mu_constant = std::log(10)

◆ step_config

StepConfig ppl::mcmc::StepAdapter::step_config

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