TuringLang / AdvancedHMC.jl

Robust, modular and efficient implementation of advanced Hamiltonian Monte Carlo algorithms
https://turinglang.org/AdvancedHMC.jl/
MIT License
228 stars 39 forks source link

Doc string error for NUTS #346

Closed sefffal closed 9 months ago

sefffal commented 1 year ago

Hello, and thanks for the great package.

I noticed a typo in the docstring for NUTS here: https://github.com/TuringLang/AdvancedHMC.jl/blob/3a4b384b656a1eb7bff4f017f1f0cbf6fc5beca7/src/constructors.jl#L69-L83

It says that init_ϵ::Real=0, is a keyword argument, but in fact no such argument is accepted.

torfjelde commented 1 year ago

Should be addressed in #347 ; thanks for raising the issue!:)

Also, note that for specifying the initial step size, you can just pass the integrator directly, e.g. NUTS(0.8; integrator=Leapfrog(0.1)) will use 0.1 as the initial stepsize :+1: This is outlined in the docs: https://turinglang.org/AdvancedHMC.jl/stable/#Convenience-Constructors (though the formattting is currently messed up due to an indentation mistake; see the docs in #347 for a more readable version)

sefffal commented 1 year ago

Thanks, looks great!