Skip to content

Fix PAWN interval selection at the maximum input value - #703

Merged
ConnectedSystems merged 1 commit into
SALib:mainfrom
vera-rubin:fix/pawn-maximum
Oct 30, 2026
Merged

ConnectedSystems merged 1 commit into
SALib:mainfrom
vera-rubin:fix/pawn-maximum

Conversation

@vera-rubin

Copy link
Copy Markdown
Contributor

PAWN excludes each input's maximum from every conditioning interval, so the sample below gives median indices of 0.25 with S=1 and 0.5 by default instead of 0 and 0.625. With one interval, the conditional and unconditional samples should coincide, giving zero sensitivity as described in the PAWN paper, p. 12.

Tested on SALib commit 748cf16, Python 3.12.3, Linux x86_64.

import numpy as np
from SALib.analyze import pawn

problem = {"num_vars": 1, "names": ["x"], "bounds": [[0, 1]]}
X = np.array([0.0, 0.25, 0.75, 1.0])[:, None]
print(pawn.analyze(problem, X, X[:, 0], S=1)["median"])
print(pawn.analyze(problem, X, X[:, 0])["median"])

We now include the maximum in the final interval. A regression test covers both cases, and the PAWN tests pass.

— ChipLab

@ConnectedSystems

Copy link
Copy Markdown
Member

New one for me @tupui - purely AI driven. Still, this is correct and useful so merging.

@ConnectedSystems
ConnectedSystems merged commit 0715fa4 into SALib:main Oct 30, 2026
5 checks passed
@tupui

tupui commented Nov 1, 2026

Copy link
Copy Markdown
Member

No problem, new models give sensible outcomes now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants