Add jitter_scale parameter for initial point generation#7643
Draft
aphc14 wants to merge 4 commits intopymc-devs:mainfrom
Draft
Add jitter_scale parameter for initial point generation#7643aphc14 wants to merge 4 commits intopymc-devs:mainfrom
aphc14 wants to merge 4 commits intopymc-devs:mainfrom
Conversation
|
|
ricardoV94
reviewed
Jan 13, 2025
| model, | ||
| overrides: StartDict | Sequence[StartDict | None] | None, | ||
| jitter_rvs: set[TensorVariable] | None = None, | ||
| jitter_scale: float = 1.0, |
Member
There was a problem hiding this comment.
Need to update the docstrings of the function that now accept jitter_scale
ricardoV94
reviewed
Jan 13, 2025
ricardoV94
reviewed
Jan 13, 2025
ricardoV94
reviewed
Jan 15, 2025
Co-authored-by: Ricardo Vieira <28983449+ricardoV94@users.noreply.github.com>
ricardoV94
reviewed
Jan 20, 2025
| model=model, | ||
| overrides=initvals, | ||
| jitter_rvs=set(model.free_RVs) if jitter else set(), | ||
| jitter_scale=jitter_scale if jitter else 1.0, |
Member
There was a problem hiding this comment.
If it's required in this inner function, there's no need for the if/else?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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/