bamojax.modified_blackjax.more_proposals
¶
generate_bernoulli_noise(rng_key, position, theta)
¶
Given a position (pytree) and a probability theta, generate a new position by flipping each bit with probability theta.
Source code in bamojax/modified_blackjax/more_proposals.py
11 12 13 14 15 16 |
|
bernoulli(theta)
¶
Create a proposal function that flips each Bernoulli random variable of the input position with probability theta.
Source code in bamojax/modified_blackjax/more_proposals.py
19 20 21 22 23 24 25 26 |
|
build_xor_step()
¶
Build a kernel that uses the xor operation to flip bits in a binary vector.
Source code in bamojax/modified_blackjax/more_proposals.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
xor_step_random_walk(logdensity_fn, random_step)
¶
Create a random walk MCMC algorithm that uses the xor operation to flip bits in a binary vector.
Source code in bamojax/modified_blackjax/more_proposals.py
46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
bernoulli_random_walk(logdensity_fn, theta)
¶
Create a random walk MCMC algorithm that moves across the space of binary vectors.
Source code in bamojax/modified_blackjax/more_proposals.py
61 62 63 64 |
|