-
-
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
Add jitter_scale parameter for initial point generation #7643
base: main
Are you sure you want to change the base?
Conversation
] |
@@ -66,6 +66,7 @@ def make_initial_point_fns_per_chain( | |||
model, | |||
overrides: StartDict | Sequence[StartDict | None] | None, | |||
jitter_rvs: set[TensorVariable] | None = None, | |||
jitter_scale: float = 1.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to update the docstrings of the function that now accept jitter_scale
Co-authored-by: Ricardo Vieira <[email protected]>
@@ -1453,6 +1456,7 @@ def _init_jitter( | |||
model=model, | |||
overrides=initvals, | |||
jitter_rvs=set(model.free_RVs) if jitter else set(), | |||
jitter_scale=jitter_scale if jitter else 1.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's required in this inner function, there's no need for the if/else?
Description
Add jitter_scale parameter to control the bounds of uniform jitter in initial points. This allows users to adjust the width of random initialisation, which is useful for the Multi-path Pathfinder algorithm to explore posteriors in a larger parameter space or where the posterior mean is much further away from the prior mean.
Changes:
Related Issue
Checklist
Type of change
📚 Documentation preview 📚: https://pymc--7643.org.readthedocs.build/en/7643/