Skip to content

Commit 64175c0

Browse files
committed
fix text of GP example
1 parent 9149568 commit 64175c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

advanced/GP.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@
745745
"\n",
746746
"This is a good canvas to discuss how to approach the label switching problem. An illustration of this is visible in the corner plot of frequency where 2 identical modes are present. As we are fitting Gaussian basis functions, there is a $N!$ degeneracy in the parameter space. For $N=2$ this is not disasterous, but sampling will quickly become innefficient for higher numbers of basis functions.\n",
747747
"\n",
748-
"There are a few options to address this, forced identifiability is a common transform to map the uniform hypercube over frequency to a simplex space, however this can have unpleasant effects on posterior geometry. In this example we will take a simpler effective approach of simply enforcing a sort in the covariance tuning. To do this we will overwrite the tuning function in the `nss` algorithm to account for this."
748+
"There are a few options to address this, forced identifiability is a common transform to map the uniform hypercube over frequency to a simplex space, however this can have unpleasant effects on posterior geometry. In this example we will take a simpler effective approach of imposing a sort in the step function of slice sampling. To do this we will overwrite the stepping function in the `nss` algorithm to account."
749749
]
750750
},
751751
{
@@ -768,7 +768,7 @@
768768
}
769769
],
770770
"source": [
771-
"def default_stepper(x, n, t):\n",
771+
"def wrapped_stepper(x, n, t):\n",
772772
" y = jax.tree_map(lambda x, n: x + t * n, x, n)\n",
773773
" idx = jnp.argsort(y[\"freq\"])\n",
774774
" y[\"freq\"] = jnp.take_along_axis(y[\"freq\"], idx, -1)\n",
@@ -782,7 +782,7 @@
782782
" n_delete=n_delete,\n",
783783
" num_mcmc_steps=num_mcmc_steps,\n",
784784
" ravel_fn=ravel_fn,\n",
785-
" stepper = default_stepper\n",
785+
" stepper = wrapped_stepper\n",
786786
")\n",
787787
"\n",
788788
"state, final = integrate(nested_sampler,rng_key, sort=True)"

0 commit comments

Comments
 (0)