Skip to content

Commit

Permalink
Merge branch 'master' into gh/update_manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion authored Mar 1, 2024
2 parents 3dad399 + 8515a56 commit c488feb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ chain_sde = sample(
model_sde,
NUTS(0.25),
5000;
init_params=[1.5, 1.3, 1.2, 2.7, 1.2, 0.12, 0.12],
initial_params=[1.5, 1.3, 1.2, 2.7, 1.2, 0.12, 0.12],
progress=false,
)
plot(chain_sde)
Expand Down
4 changes: 2 additions & 2 deletions tutorials/docs-12-using-turing-guide/using-turing-guide.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,14 @@ Standard errors are calculated from the Fisher information matrix (inverse Hessi

#### Sampling with the MAP/MLE as initial states

You can begin sampling your chain from an MLE/MAP estimate by extracting the vector of parameter values and providing it to the `sample` function with the keyword `init_params`. For example, here is how to sample from the full posterior using the MAP estimate as the starting point:
You can begin sampling your chain from an MLE/MAP estimate by extracting the vector of parameter values and providing it to the `sample` function with the keyword `initial_params`. For example, here is how to sample from the full posterior using the MAP estimate as the starting point:

```julia; eval=false
# Generate an MAP estimate.
map_estimate = optimize(model, MAP())

# Sample with the MAP estimate as the starting point.
chain = sample(model, NUTS(), 1_000; init_params=map_estimate.values.array)
chain = sample(model, NUTS(), 1_000; initial_params=map_estimate.values.array)
```

## Beyond the Basics
Expand Down

0 comments on commit c488feb

Please sign in to comment.