# Turing.jl - NUTS/sample parameters

**URL:** https://discourse.julialang.org/t/turing-jl-nuts-sample-parameters/30058
**Category:** Statistics
**Tags:** turing
**Created:** [October 18, 2019, 4:32pm UTC](https://discourse.julialang.org/t/turing-jl-nuts-sample-parameters/30058 "2019-10-18T16:32:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mthelm85](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mthelm85/32/224164_2.png) [@mthelm85](https://discourse.julialang.org/u/mthelm85)
#### Post date: [October 18, 2019, 4:32pm UTC](https://discourse.julialang.org/t/turing-jl-nuts-sample-parameters/30058/1 "2019-10-18T16:32:02Z")

</div>

Hello,

I’m trying to learn Turing.jl and the concepts behind it and I’m not seeing any documentation that explains what the parameters are that are passed to `NUTS()` when sampling. The documentation utilizes the NUTS sampler in several of the tutorials but I can’t seem to find anything that explains what the function arguments are. For example, when using the NUTS sampler with a linear regression model:

```julia
chain = sample(model, NUTS(200, 0.65), 1500)

```

What are 200, 0.65 and 1500?

---

<div class="post-metadata">

### Author: ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)
#### Post date: [October 18, 2019, 11:12pm UTC](https://discourse.julialang.org/t/turing-jl-nuts-sample-parameters/30058/2 "2019-10-18T23:12:20Z")

</div>

Here is the docstring [https://github.com/TuringLang/Turing.jl/blob/master/src/inference/hmc.jl#L214](https://github.com/TuringLang/Turing.jl/blob/master/src/inference/hmc.jl#L214). There is an empty line between the docstring and type definition so it is not showing in the help. I will fix that. 1500 is the number of samples.

---

<div class="post-metadata">

### Author: ![cpfiffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cpfiffer/32/208747_2.png) [@cpfiffer](https://discourse.julialang.org/u/cpfiffer)
#### Post date: [October 19, 2019, 1:54am UTC](https://discourse.julialang.org/t/turing-jl-nuts-sample-parameters/30058/3 "2019-10-19T01:54:25Z")

</div>

200 is the number of adaptation samples. Adaptation samples are used to set the sampler up to generate good samples, and are discarded by default (so your chain will end up with 1500 - 200 samples).

0.65 is the target acceptance rate for samples, but for most use cases it’s fine to leave it at 0.65.
