SCITE
SCITE copied to clipboard
Question about tree swap implementation
Hi, Thanks for this excellent tool and paper.
I was reading through the SCITE source code to understand the Swap subtrees
section of the Supplemental Material
section of the SCITE paper. In particular, I am trying to figure out whether d(i)
and d(k)
are calculated before or after the tree swap move.
From the source code at https://github.com/cbg-ethz/SCITE/blob/master/mcmcTreeMove.cpp#L65 it appears that d(k)
is calculated before the swap, and that d(i)
is calculated after the swap. Please correct me if I'm wrong.
However, I also noticed a potential bug in the calculation of the neighborhood correction at https://github.com/cbg-ethz/SCITE/blob/master/mcmcTreeMove.cpp#L72
nbhcorrection = 1.0*descendants.size()/nextdescendants.size();
What happens if nextdescendants
is empty? Or does nextdescendants
always contain the parent node (i.e. i
) as well?