1 | BuildTree(theta, r, u, v, j, epsilon, L, joint0)
|
theta |
starting position |
r |
starting momentum |
u |
a slice variable, which is used to simplify the implementation |
v |
a randomly generated value, which is used to determine the direction of movement |
j |
the height of a tree |
epsilon |
step size |
joint0 |
to avoid computing the same value repeatedly, we compute joint0=log0- 0.5*(r0 |
a list of variables. It includes updated leftmost and rightmost states. It also returns updated values which are used to improve memory efficience. This function builds the tree for NUTS
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.