From da0a41c31e22794f8da8d16539a7f5917153ad24 Mon Sep 17 00:00:00 2001 From: Kyurae Kim Date: Wed, 29 May 2024 02:38:21 -0400 Subject: [PATCH] fix docs for polar slice sampler --- docs/src/gibbs_polar.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/src/gibbs_polar.md b/docs/src/gibbs_polar.md index 2c9a4d8..3305f60 100644 --- a/docs/src/gibbs_polar.md +++ b/docs/src/gibbs_polar.md @@ -39,16 +39,20 @@ The only tunable parameter of the algorithm is the size of the search interval ( ## Interface -!!! warning +!!! info By the nature of polar coordinates, GPSS only works reliably for targets with dimension at least $$d \geq 2$$. -!!! warning - When initializing the chain (*e.g.* the `initial_params` keyword arguments in `AbstractMCMC.sample`), it is necessary to inialize from a point $$x_0$$ that has a sensible norm $$\lVert x_0 \rVert > 0$$, otherwise, the chain will start from a pathologic point in polar coordinates. This might even result in the sampler getting stuck in an infinite loop. (This can be prevented by setting `max_proposals`.) If $$\lVert x_0 \rVert \leq 10^{-5}$$, the current implementation will display a warning. Note that, `Turing` often changes `initial_params` to match the support constraints. This might lead to $$\lVert x_0 \rVert$$ being small, even though the vector you passed to`initial_params` has a sufficiently large norm. - ```@docs GibbsPolarSlice ``` +!!! warning + When initializing the chain (*e.g.* the `initial_params` keyword arguments in `AbstractMCMC.sample`), it is necessary to inialize from a point $$x_0$$ that has a sensible norm $$\lVert x_0 \rVert > 0$$, otherwise, the chain will start from a pathologic point in polar coordinates. This might even result in the sampler getting stuck in an infinite loop. (This can be prevented by setting `max_proposals`.) If $$\lVert x_0 \rVert \leq 10^{-5}$$, the current implementation will display a warning. + +!!! info + For Turing users: `Turing` might change `initial_params` to match the support of the posterior. This might lead to $$\lVert x_0 \rVert$$ being small, even though the vector you passed to`initial_params` has a sufficiently large norm. If this is suspected, simply try a different initialization value. + + ## Demonstration As illustrated in the original paper, GPSS shows good performance on heavy-tailed targets despite being a multivariate slice sampler. Consider a 10-dimensional Student-$$t$$ target with 1-degree of freedom (this corresponds to a multivariate Cauchy):