Skip to content

Commit 5335022

Browse files
authored
nuts docs (#1463)
1 parent beb4405 commit 5335022

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/inference/hmc.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function AbstractMCMC.sample_init!(
174174
model(rng, spl.state.vi, spl)
175175
elseif islinked(spl.state.vi, spl) && spl.selector.tag != :default
176176
invlink!(spl.state.vi, spl)
177-
model(rng, spl.state.vi, spl)
177+
model(rng, spl.state.vi, spl)
178178
end
179179
end
180180

@@ -289,7 +289,7 @@ No-U-Turn Sampler (NUTS) sampler.
289289
Usage:
290290
291291
```julia
292-
NUTS() # Use default NUTS configuration.
292+
NUTS() # Use default NUTS configuration.
293293
NUTS(1000, 0.65) # Use 1000 adaption steps, and target accept ratio 0.65.
294294
```
295295
@@ -299,7 +299,7 @@ Arguments:
299299
- `δ::Float64` : Target acceptance rate for dual averaging.
300300
- `max_depth::Int` : Maximum doubling tree depth.
301301
- `Δ_max::Float64` : Maximum divergence during doubling tree.
302-
- `ϵ::Float64` : Inital step size; 0 means automatically searching using a heuristic procedure.
302+
- `init_ϵ::Float64` : Inital step size; 0 means automatically searching using a heuristic procedure.
303303
304304
"""
305305
mutable struct NUTS{AD, space, metricT <: AHMC.AbstractMetric} <: AdaptiveHamiltonian{AD}
@@ -434,8 +434,8 @@ function AbstractMCMC.step!(
434434

435435
# Adaptation
436436
if spl.alg isa AdaptiveHamiltonian
437-
spl.state.h, spl.state.traj, isadapted =
438-
AHMC.adapt!(spl.state.h, spl.state.traj, spl.state.adaptor,
437+
spl.state.h, spl.state.traj, isadapted =
438+
AHMC.adapt!(spl.state.h, spl.state.traj, spl.state.adaptor,
439439
spl.state.i, spl.alg.n_adapts, t.z.θ, t.stat.acceptance_rate)
440440
end
441441

0 commit comments

Comments
 (0)