tensorflow / tensorflow/probability

Bijectors and initial values to NUTS

Open
#641 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Jupyter Notebook
Stars
4.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Hi,

I have a question about the initial values passed to a NUTS sampler with constraining bijectors. As far as I understand, the initial values should be in the constrained space, right? If so - perhaps it would be more "friendly" to accept initial values from the unconstrained space? It took me a while to figure out why NUTS is returning nans...

I guess it's not too complicated (for the user, that is) to add something like

current_state=[bijector.forward(init) for bijector, init in zip(bijectors_list, initial_states)],

when calling the sample_mcmc function (this seems to work, at least in a simple example); Just raising the point to hear other people's thoughts on this.

Contributor guide

Open the contributing guide

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.

Research direction

Start by tracing the sample_mcmc entry point and how constraining bijectors and current_state are handled. Determine whether initial values should be accepted in unconstrained space, then define the expected behavior for invalid values and NaNs. Done means the API decision is implemented or documented with coverage for the relevant initialization path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.