Skip to content

Commit e738b1d

Browse files
committed
fix docs move infos and warnings for GibbsPolarSlice to docstring
1 parent a28b21a commit e738b1d

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

docs/src/gibbs_polar.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,10 @@ The only tunable parameter of the algorithm is the size of the search interval (
4040

4141
## Interface
4242

43-
!!! info
44-
By the nature of polar coordinates, GPSS only works reliably for targets with dimension at least $$d \geq 2$$.
45-
4643
```@docs
4744
GibbsPolarSlice
4845
```
4946

50-
!!! warning
51-
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.
52-
53-
!!! info
54-
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.
55-
56-
5747
## Demonstration
5848
As illustrated in the original paper, GPSS shows good performance on heavy-tailed targets despite being a multivariate slice sampler.
5949
Consider a 10-dimensional Student-$$t$$ target with 1-degree of freedom (this corresponds to a multivariate Cauchy):

src/multivariate/gibbspolar.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ Gibbsian polar slice sampling algorithm by P. Schär, M. Habeck, and D. Rudolf [
1010
# Keyword Arguments
1111
- `w::Real`: Initial window size for the radius shrinkage procedure
1212
- `max_proposals::Int`: Maximum number of proposals allowed until throwing an error (default: `10^6`).
13+
14+
!!! info
15+
By the nature of polar coordinates, GPSS only works reliably for targets with dimension at least \$\$d \\geq 2\$\$.
16+
17+
!!! warning
18+
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.
19+
20+
!!! info
21+
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.
1322
"""
1423
struct GibbsPolarSlice{W <: Real} <: AbstractMultivariateSliceSampling
1524
w::W

0 commit comments

Comments
 (0)