gemlib.mcmc.adaptive_rwmh#
- gemlib.mcmc.adaptive_rwmh(initial_scale=0.1, initial_running_covariance=None, lambda0=0.1, adapt_prob=0.95)#
An Adaptive Random Walk Metropolis Hastings algorithm
This algorithm implements an adaptive random walk Metropolis Hastings algorithm as described in Sherlock et al. 2010.
- Parameters:
initial_scale (float) – the initial value of the covariance scalar
initial_running_covariance (Tensor | None) – an initial covariance matrix of shape [p,p] where p is the length of the vector of concatenated parameters
lambda0 (float) – the scaling for the non-adaptive covariance matrix
adapt_prob (float) – probability we draw using the adaptive covariance matrix
adaptation_quantity – the amount to add or subtract from the covariance scaling parameter. Defaults to 2.38/d^{-1/2}.
name – an optional name for the kernel
- Returns:
- Return type:
References
Chris Sherlock, Paul Fearnhead, Gareth O. Roberts. “The Random Walk Metropolis: Linking Theory and Practice Through a Case Study.” Statistical Science, 25(2) 172-190 May 2010.