Repository navigation
Fix non-finite Morris samples for unbounded distributions - #693
Merged
ConnectedSystems merged 3 commits intoOct 10, 2026
Merged
Conversation
Move check method into separate function and add additional details to message. Could form the basis for applying the check across all SALib methods.
Member
|
Thanks for the PR @DresdenGman have reviewed code and made some changes with a view to expand these checks for other SALib methods. |
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.
Summary
inf/-inftruncnormRationale
Morris trajectories include the unit-interval endpoints. Passing those endpoints through unbounded inverse CDFs makes normal inputs produce
-inf/infand lognormal inputs produceinf(and zero at the lower endpoint). Currentmain, for example, returns non-finite values for bothnormandlognormwith a one-variable, four-level design.Changing the shared distribution scaler to truncate these distributions implicitly would affect every SALib sampler and would silently change the distribution requested by the user. This patch instead adds a Morris-specific reliability guard after scaling. Bounded workflows remain explicit and unchanged.
The error identifies every affected column, explains why the Morris grid triggers the problem, and suggests the existing
truncnormoption. A control regression verifies that a bounded truncated-normal problem continues to return finite samples.Validation
85 passed, 1 xfailedacross the Morris sampler, Morris strategies, regression, groups, seed, and utility suitesCloses #515