Skip to content

Commit

Permalink
Fixed typo leapfrop to leapfrog (#1538)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter authored Feb 4, 2021
1 parent 1a4b4e5 commit 602aa5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/src/using-turing/sampler-viz.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ plot_sampler(c)

### HMC

Hamiltonian Monte Carlo (HMC) sampling is a typical sampler to use, as it tends to be fairly good at converging in a efficient manner. It can often be tricky to set the correct parameters for this sampler however, and the `NUTS` sampler is often easier to run if you don't want to spend too much time fiddling with step size and and the number of steps to take. Note however that `HMC` does not explore the positive values μ very well, likely due to the leapfrop and step size parameter settings.
Hamiltonian Monte Carlo (HMC) sampling is a typical sampler to use, as it tends to be fairly good at converging in a efficient manner. It can often be tricky to set the correct parameters for this sampler however, and the `NUTS` sampler is often easier to run if you don't want to spend too much time fiddling with step size and and the number of steps to take. Note however that `HMC` does not explore the positive values μ very well, likely due to the leapfrog and step size parameter settings.

```julia
c = sample(model, HMC(0.01, 10), 1000)
Expand Down
4 changes: 2 additions & 2 deletions src/inference/hmc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Hamiltonian Monte Carlo sampler with static trajectory.
Arguments:
- `ϵ::Float64` : The leapfrog step size to use.
- `n_leapfrog::Int` : The number of leapfrop steps to use.
- `n_leapfrog::Int` : The number of leapfrog steps to use.
Usage:
Expand Down Expand Up @@ -282,7 +282,7 @@ Arguments:
- `n_adapts::Int` : Numbers of samples to use for adaptation.
- `δ::Float64` : Target acceptance rate. 65% is often recommended.
- `λ::Float64` : Target leapfrop length.
- `λ::Float64` : Target leapfrog length.
- `ϵ::Float64=0.0` : Inital step size; 0 means automatically search by Turing.
For more information, please view the following paper ([arXiv link](https://arxiv.org/abs/1111.4246)):
Expand Down

0 comments on commit 602aa5f

Please sign in to comment.