An implementation of the Metropolis-Hastings algorithm for the generation of a Markov chain. This is a default implementation that allows sampling of normally distributed posterior distributions centered on zero with unit standard deviations. Proposals are generated from a multivariate normal distribution with an identity covariance matrix and centered on zero. To alter these sampling and target distributions simply create a new class inheriting from this class and override the appropriate routines.
procedure , public :: compute_hastings_ratio => mh_hastings_ratio Function | |
procedure , public :: evaluate_proposal_pdf => mh_eval_proposal Function | |
procedure , public :: generate_proposal => mh_proposal Function | |
procedure , public :: get_accepted_count => mh_get_num_accepted Function | |
procedure , public :: get_chain => mh_get_chain Function | |
procedure , public :: get_chain_length => mh_get_chain_length Function | |
procedure , public :: get_proposal_cholesky => mh_get_prop_chol_cov Function | |
procedure , public :: get_proposal_covariance => mh_get_prop_cov Function | |
procedure , public :: get_proposal_initialized => mh_get_is_prop_init Function | |
procedure , public :: get_proposal_means => mh_get_prop_mean Function | |
procedure , public :: get_state_variable_count => mh_get_nvars Function | |
generic, public :: initialize_proposal => mh_init_proposal_1, mh_init_proposal_2 | |
procedure , public :: on_acceptance => mh_on_success Subroutine | |
procedure , public :: on_rejection => mh_on_rejection Subroutine | |
procedure , public :: push_new_state => mh_push Subroutine | |
procedure , public :: reset => mh_clear_chain Subroutine | |
procedure , public :: sample => mh_sample Subroutine | |
procedure , public :: set_proposal_covariance => mh_set_prop_cov Subroutine | |
procedure , public :: set_proposal_means => mh_set_prop_mean Subroutine | |
procedure , public :: target_distribution => mh_target Function |