Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit behavior in pm.sample() when init=None #4291

Closed
ricardoV94 opened this issue Dec 3, 2020 · 0 comments · Fixed by #5622
Closed

Implicit behavior in pm.sample() when init=None #4291

ricardoV94 opened this issue Dec 3, 2020 · 0 comments · Fixed by #5622

Comments

@ricardoV94
Copy link
Member

ricardoV94 commented Dec 3, 2020

When sample() is initiated with init=None, pymc3 does not try to call the general init_nuts() function, and instead silently defaults to the elementwise auto-assignment with assign_step_methods().

This behavior however is not explicitly mentioned in the documentation, where it is suggested that the init argument should always be a string with one of the listed options. Should we:

  1. enforce this constraint, similarly to what is already done in init_nuts(), by raising TypeError and ValueError when an invalid init argument is passed?
  2. document and allow this behavior, either by adding None as an explicit option in the documentation or adding a new string argument init="elementwise" that would work as None currently does.
  3. do nothing...

I would be inclined to 1). If users want to avoid the default auto-assignment of the Nuts sampler, the documentation is quite clear that they should pass the desired step methods via the argument step.

@ricardoV94 ricardoV94 changed the title Implicit behavior in pm.sample, when init=None Implicit behavior in pm.sample() when init=None Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant