The initial parameters, representing the place the Metropolis hastings algorithm starts
The likelihood function of the model, typically a pseudo-marginal likelihood estimated using the bootstrap particle filter for the PMMH algorithm
Definition of the log-transition, used when calculating the acceptance ratio This is the probability of moving between parameters according to the proposal distribution Note: When using a symmetric proposal distribution (eg.
Definition of the log-transition, used when calculating the acceptance ratio This is the probability of moving between parameters according to the proposal distribution Note: When using a symmetric proposal distribution (eg. Normal) this cancels in the acceptance ratio
the previous parameter value
the proposed parameter value
Proposal density, to propose new parameters for a model
Use the Breeze Markov Chain to generate a process of MetropState Calling .sample(n) on this will create a single site metropolis hastings, proposing parameters only from the initial supplied parameter values
Generates an akka stream of MetropState, containing the current parameters, count of accepted moves and the current pseudo marginal log-likelihood Unfortunately for an unknown reason this isn't working
Returns iterations from the MCMC algorithm in a vector using sampleStep, sampleStep
Use the same step for iterations in a stream
Generic metropolis-hastings step, which can be used with the usual acceptance ratio or simplified to the metropolis ratio by specifying the log-transition of the parameters to be zero
A single step of the metropolis hastings algorithm to be used with breeze implementation of Markov Chain.
A single step of the metropolis hastings algorithm to be used with breeze implementation of Markov Chain. This is a slight alteration to the implementation in breeze, here MetropState holds on to the previous calculated pseudo marginal log-likelihood value so we don't need to run the previous particle filter again each iteration
Return an akka stream of the parameters
Prior distribution for the parameters, with default implementation