max_treedepth argument ignored

Open
#448 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
data

Research direction

The problem is in how the control list passed to ulam is handled, so start from the ulam function and trace where max_treedepth is read and forwarded to the sampler. Reproduce it by fitting a small model with control=list(max_treedepth=15) and checking the treedepth reported in the sampler output. Done means the setting takes effect without also needing adapt_delta, and a test or example shows the changed treedepth.

Written by the indexing model from the issue text.

Description

When I try to pass a list to controls to adjust the max treedepth this gets not evaluated. It claims that I need to provide a value for adapt_delta in the first place. When I provide this the model runs but treedepth is still at 10.

So just passing control=list(max_treedepth=15) to the ulam function as pointed out on page 300 does not work. Adding adapt_delta does not help to adjust the treedepth value.

Dominant language
R
Stars
2.4k
Forks
632
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rmcelreath/rethinking

All issues in rmcelreath/rethinking

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.