Debugging split/merge toy sampler.
Split from 5 to 6 groups:
split_alpha = -p_merge + p_split - q_split + q_merge - log(psplitmv) + log(0.5);
K>> p_merge
p_merge =
-1.4437e+03
-1.4437e+03 + -1.6060e+03 - -125.6828 + -2.7081
K>> p_split
p_split =
-1.6060e+03
K>> q_split
q_split =
-125.6828
K>> q_merge
q_merge =
-2.7081
K>> log(psplitmv)
ans =
-0.6931
K>> log(0.5)
ans =
-0.6931
K>>
Merge from 6 to 5 groups:
merge_alpha = p_merge - p_split + q_split - q_merge - pmergemv + psplitmv ;
K>> p_merge
p_merge =
-1.4437e+03
K>> p_split
p_split =
-1.6060e+03
K>> q_split
q_split =
-208.8604
K>> q_merge
q_merge =
-2.7081
K>> pmergemv
pmergemv =
-0.6931
K>> psplitmv
psplitmv =
-0.6931
Note that q_split doesn't match between the two moves.
After reflection, this shouldn't match, because we're comparing two different cases. Specifically, the post-split results in two small groups, where as the pre-merge model has 6 groups of equal size. Smaller groups have smaller number of ways to split, so the proposal probability is higher.
Killed myself today thinking about this problem and getting exactly nowhere.
Posted by Kyle Simek