Defines the interface to an automated factor slice sampler, which isn't as efficient as Stan in terms of ESS per iteration, but doesn't require gradients and tends to do better than an adaptive MH algorithm. Additionally it hardly uses any tuning parameters.
|
| sampler_automated_factor_slice_sampler_MCMC (int seed, likelihood &L, std::vector< std::string > var_names, size_t dimension) |
|
void | set_initial_location (std::vector< double > initial) |
| Sets the starting location for the sampler. More...
|
|
void | run_sampler (int nsteps, int thin, int refresh, int verbosity=1) |
|
void | set_adaptation_parameters (int num_warmup, bool save_adapt) |
| sets the adaption interval for the slice sampler. This will adapt the directions of the slices and the windowing procedure for the problem. This is important for performance. More...
|
|
void | set_intial_widths (std::vector< double > intitial_width) |
| Sets the initial widths to be used for slices. More...
|
|
void | set_window_parameters (int init_buffer, int window) |
| Sets the window parameters for the adaptation. This is inspired by stan. The initial window will be solely for building the initial covariance estimate and finding some reasonable initial widths for the slices. Window then says how long the initial covariance adaptation round will last. We then increase by factors of 2 until we have exhausted the adaptation stage of the sampler. More...
|
|
void | set_initial_covariance (Eigen::MatrixXd covariance) |
| Sets the initial covariance matrix for the slice sampler. This will then be diagonalized to find the principal directions. More...
|
|
void | get_chain_state (std::vector< double > ¶meters, std::vector< double > &sample_state) |
|
void | set_chain_state (std::vector< double > model_values, std::vector< double > state_values) |
|
void | write_checkpoint (std::ostream &) |
|
void | read_checkpoint (std::string ckpt_file) |
| Restarts the sampler from the state specified in the ckpt_file. More...
|
|
void | read_checkpoint (std::istream &ckpt_in) |
|
void | reset_sampler_step () |
|
| sampler_MCMC_base (int seed, likelihood &L, std::vector< std::string > var_names, size_t dimension) |
|
virtual void | set_output_stream (std::string chain_name, std::string state_name, std::string sampler_name, int output_precision=8) |
| Sets the output names for the chains and sampler states. This must be implemented in any classes inheriting sampler_exploration_mcmc_base. More...
|
|
virtual std::vector< double > | find_best_fit (std::string chain_file, std::string state_file) const |
| Finds the best fit within provided chain file and returns it. More...
|
|
virtual std::vector< double > | find_best_fit () const |
| Finds the best fit from the chain and state file saved in set_output_stream. More...
|
|
void | set_checkpoint (int ckpt_stride, std::string ckpt_file) |
| Sets the checkpoint/restart functionality. More...
|
|
void | reset_likelihood_sum () |
|
double | get_likelihood_sum () |
|
virtual double | get_rand () |
|
virtual void | reset_rng_seed (int seed) |
|
void | set_mpi_communicator (MPI_Comm comm) |
| Sets the MPI_Comm to be used for the likelihood evaluation. More...
|
|
void | close_streams () |
| Helper function that closes the streams from a sampler.
|
|
|
void | write_state () |
|
void | write_chain_header () |
|
void | write_state_header () |
|
void | write_sampler_header () |
|
double | loglklhd_transform (std::vector< double > cont_params) |
|
void | generate_transition (int step, int start, int finish, int nthin, int refresh, bool save, int verbosity) |
|
void | factor_slice_sample (const int k, const double h) |
|
void | ray_position (int k, double t, std::vector< double > &ray) |
|
int | step_out (const int k, double logh, std::vector< double > &lower_ray, std::vector< double > &upper_ray, double &tmin, double &tmax) |
|
void | shrink (int k, std::vector< double > &lower_ray, std::vector< double > &upper_ray, double t) |
|
void | update_covariance (std::vector< double > sample) |
|
void | set_adaptation_schedule () |
|
double | factor_adapt () |
|
void | width_adapt () |
|