-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
pymc3.sample() not starting from the specified start value #4689
Comments
Hey Adrian - I'm going to (unfortunately) mark this as "working as intended", though not going to close, since the API is pretty unforgiving:
with pm.Model() as model:
lnx = pm.Uniform('lnx', 0., 5.)
infdata = pm.sample(tune=100, draws=0,
start={'lnx_interval__': lnx.transformation.forward(1.).eval()},
init='adapt_diag',
step=pm.NUTS(step_scale=100),
return_inferencedata=True,
discard_tuned_samples=False,
chains=1) does The Right Thing. Notice that I provided a bad initial step scale, so that I would reject a few proposals, and they would get recorded in the trace. |
It may be helpful to know how much each of these things variously offends you (or anyone else!), and break them out into their own issues in case someone wants to pick them up? |
I frequently fall victim to this too. Last time it almost found it's way into the manuscript submission. IMHO we should change the API such that it does what the user expects in this case. We could just loop over the transformed variables and look for entries that correspond to the untransformed name. Because these names are unique it won't be a problem at all. |
I think @ColCarroll is right here. If there are specific problems we should open issues for them. This issue doesn't seem helpful on its own anymore |
(see also: https://discourse.pymc.io/t/pymc3-sample-not-starting-from-the-specified-start-value/7419)
Description of your problem
I would like to set the start value explicitly when calling pm.sample() using
start=
, but it seems like the tuning does not use the input. I know that for some initialization methods (e.g.,jitter+adapt_diag
), the init can override the start. However, I would not expectadapt_diag
to override the input start. As example:Please provide the full traceback.
I would expect
infdata.warmup_posterior.lnx.values[0, 0] == 1.
with the example above, but instead it seems to initialize at a random point.Versions and main components
The text was updated successfully, but these errors were encountered: