Safer treatment of parameters out of boundaries#209
Open
Safer treatment of parameters out of boundaries#209
Conversation
for more information, see https://pre-commit.ci
3473f18 to
3ef8f96
Compare
3dede26 to
67727f1
Compare
Pull Request Test Coverage Report for Build 21007291517Details
💛 - Coveralls |
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.
Sometimes the parameters proposed by the MCMC are too extreme and fall outside the allowed bounds. In the current implementation, the simulation is still executed in this case. This behavior both wastes computing resources and risks breaking the simulation, since the code is JIT-compiled and does not validate whether invalid parameters are passed to operations such as
jnp.random.binomial.This PR proposes to skip the simulation step entirely when the proposed parameters are out of bounds. In addition, it issues a warning when the number of simulated events in a given bin is zero, so that users can address the issue more promptly—for example, by increasing the
batch_sizeor by imposing more restrictive bounds on the parameters.