1 #ifndef STAN_MCMC_VAR_ADAPTATION_HPP
2 #define STAN_MCMC_VAR_ADAPTATION_HPP
4 #include <stan/math/prim/mat/fun/Eigen.hpp>
6 #include <stan/math/prim/mat/fun/welford_var_estimator.hpp>
27 double n =
static_cast<double>(
estimator_.num_samples());
28 var = (n / (n + 5.0)) * var
29 + 1e-3 * (5.0 / (n + 5.0)) * Eigen::VectorXd::Ones(var.size());
Probability, optimization and sampling library.
bool end_adaptation_window()
stan::math::welford_var_estimator estimator_
void compute_next_window()
unsigned int adapt_window_counter_
bool learn_variance(Eigen::VectorXd &var, const Eigen::VectorXd &q)