Skip to content

Bootstrap the DGSM value itself for dgsm_conf - #699

Merged
ConnectedSystems merged 1 commit into
SALib:mainfrom
raashish1601:fix/698-dgsm-conf
Oct 29, 2026
Merged

ConnectedSystems merged 1 commit into
SALib:mainfrom
raashish1601:fix/698-dgsm-conf

Conversation

@raashish1601

Copy link
Copy Markdown
Contributor

Fixes #698

calc_dgsm bootstrapped only vi, so dgsm_conf was the interval of vi without the (ub - lb)**2 / (D * pi**2) factor used for dgsm. It wasn't in the same units as dgsm: scaling Y by 10 left dgsm unchanged but multiplied dgsm_conf by 100.

Each bootstrap resample now computes the DGSM value itself, recomputing vi and D = var(base) on the resampled rows, and the interval is taken from those values. dgsm and the other outputs are unchanged.

With the example from the issue, dgsm_conf is now [0.327, 0.74, 0.322] both for Y and 10 * Y. Before, it was [1.035, 0.981, 1.534] and [103.461, 98.082, 153.4].

Tests: added tests/test_analyze_dgsm.py, which checks that dgsm_conf doesn't change when Y is scaled. It fails on main. The existing DGSM tests still pass, including test_cli_analyze.py::test_dgsm, which checks that the reference values are within dgsm ± dgsm_conf. pytest tests/test_regression.py tests/test_to_df.py tests/test_cli_analyze.py passes locally, except test_cli_analyze.py::test_delta, which can't run on my Windows machine (an OS policy blocks a binary it uses) and doesn't touch DGSM. The pre-commit hooks (black, ruff) pass.

@ConnectedSystems

Copy link
Copy Markdown
Member

Thanks @raashish1601 , the changes look good to me

@ConnectedSystems
ConnectedSystems merged commit a9f36b6 into SALib:main Oct 29, 2026
5 checks passed
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.

dgsm.analyze: dgsm_conf is the bootstrap interval of vi, not of dgsm

2 participants