bayespy.utils.random.alpha_beta_recursion(logp0, logP)[source]

Compute alpha-beta recursion for Markov chain

Initial state log-probabilities are in p0 and state transition log-probabilities are in P. The probabilities do not need to be scaled to sum to one, but they are interpreted as below:

logp0 = log P(z_0) + log P(y_0|z_0) logP[...,n,:,:] = log P(z_{n+1}|z_n) + log P(y_{n+1}|z_{n+1})