Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for t in 1...T:
- new_a = ... //propose new variables a
- p = min(1,p(X|new_a,b)/p(X|a,b))
- thresh = ... //a random number generated from a uniform [0,1]
- if thresh < p:
- a = new_a //accept new_a
- new_b = ... //propose new variables b
- p = min(1,p(X|a,new_b)/p(X|a,b))
- thresh = ... //a random number generated from a uniform [0,1]
- if thresh < p:
- b = new_b //accept new_b
- for t in 1...T:
- new_a = ... //propose new variables a
- new_b = ... //propose new variables b
- p = min(1,p(X|new_a,new_b)/p(X|a,b))
- thresh = ... //a random number generated from a uniform [0,1]
- if thresh < p:
- a = new_a, b = new_b //accept both a and b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement