You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* tweak default max proposal limit and improve max proposal error msg
* fix docs move infos and warnings for `GibbsPolarSlice` to docstring
* bump setup-julia action version
Copy file name to clipboardExpand all lines: docs/src/gibbs_polar.md
+3-11Lines changed: 3 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,6 @@ Unlike other slice sampling algorithms, it operates a Gibbs sampler over polar c
8
8
Due to the involvement of polar coordinates, GPSS only works reliably on more than one dimension.
9
9
However, unlike ESS, GPSS is applicable to any target distribution.
10
10
11
-
12
11
## Description
13
12
For a $$d$$-dimensional target distribution $$\pi$$, GPSS utilizes the following augmented target distribution:
14
13
```math
@@ -34,26 +33,19 @@ The Gibbs steps on $$\theta$$ and $$r$$ are implemented through specialized shri
34
33
35
34
The only tunable parameter of the algorithm is the size of the search interval (window) of the shrinkage sampler for the radius variable $$r$$.
36
35
36
+
!!! warning
37
+
A limitation of the current implementation of GPSS is that the acceptance rate exhibits a heavy tail. That is, occasionally, a single transition might take an excessive amount of time.
38
+
37
39
!!! info
38
40
The kernel corresponding to this sampler is defined on an **augmented state space** and cannot directly perform a transition on $$x$$.
39
41
This also means that the corresponding kernel is not reversible with respect to $$x$$.
40
42
41
43
## Interface
42
44
43
-
!!! info
44
-
By the nature of polar coordinates, GPSS only works reliably for targets with dimension at least $$d \geq 2$$.
45
-
46
45
```@docs
47
46
GibbsPolarSlice
48
47
```
49
48
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
-
57
49
## Demonstration
58
50
As illustrated in the original paper, GPSS shows good performance on heavy-tailed targets despite being a multivariate slice sampler.
59
51
Consider a 10-dimensional Student-$$t$$ target with 1-degree of freedom (this corresponds to a multivariate Cauchy):
Copy file name to clipboardExpand all lines: src/multivariate/gibbspolar.jl
+14-2Lines changed: 14 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9,14 +9,26 @@ Gibbsian polar slice sampling algorithm by P. Schär, M. Habeck, and D. Rudolf [
9
9
10
10
# Keyword Arguments
11
11
- `w::Real`: Initial window size for the radius shrinkage procedure
12
-
- `max_proposals::Int`: Maximum number of proposals allowed until throwing an error (default: `typemax(Int)`).
12
+
- `max_proposals::Int`: Maximum number of proposals allowed until throwing an error (default: `$(DEFAULT_MAX_PROPOSALS)`).
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
+
!!! info
18
+
The initial window size `w` must be set at least an order of magnitude larger than what is sensible for other slice samplers. Otherwise, a large number of rejections might be experienced.
19
+
20
+
!!! warning
21
+
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.
22
+
23
+
!!! info
24
+
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.
0 commit comments