Skip to content

Commit 5674d16

Browse files
committed
Mention energy error in docs
1 parent 943e5fc commit 5674d16

File tree

2 files changed

+8
-3583
lines changed

2 files changed

+8
-3583
lines changed

docs/sampling-options.qmd

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ For each of the `store_*` arguments, additional arrays will be availbale in the
6868
```python
6969
trace = nutpie.sample(
7070
model,
71-
target_accept=0.8, # Target acceptance rate
72-
maxdepth=10 # Maximum tree depth
71+
target_accept=0.8, # Target acceptance rate
72+
maxdepth=10 # Maximum tree depth
73+
max_energy_error=1000 # Error at witch to count the trajectory as a divergent transition
7374
)
7475
```
7576

@@ -83,6 +84,11 @@ might avoid divergences during sampling. In many diverging models increasing
8384
`target_accept` will only make divergences less frequent however, and not solve
8485
the underlying problem.
8586

87+
Lowering the maximum energy error to for instance 10 will often increase the
88+
number of divergences, and make it easier to diagnose their cause. With lower
89+
value the divergences often are reported closer to the critical points in the
90+
parameter space, where the model is most likely to diverge.
91+
8692
## Mass Matrix Adaptation
8793

8894
Nutpie offers several strategies for adapting the mass matrix, which determines

0 commit comments

Comments
 (0)