You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrong second-order effects for lognormal inputs #43
Python package (and dashboard) returns wildly negative second-order effects for independent inputs, if one of them is lognormal and another uniform (I haven't tested other combinations). In the Matlab package, the second-order is adequate.
Source: The difference is that in MATLAB we have a custom binning function, while in Python we use a ready-made one from some library.
Solution: So I guess there is no better solution than adopt the Matlab binning algorithm to Python as well.
Example.
(Matlab for the same problem with lognormal interest_rate returns a meaningful SOE=0.01)
Exactly, when there are two uniforms, the indices are adequate, but when one is uniform and another lognormal -> weird negative second-order, eventhough inputs are independent.
For the same problem in matlab the second-order is about 1% for both cases, which is a desired reasonable result.
Activity
tupui commentedon Jan 28, 2026
Are we seeing the same thing on the scatter plots? Because the bottom one does not show a lognormal distribution.
gnopik commentedon Jan 31, 2026
Exactly, when there are two uniforms, the indices are adequate, but when one is uniform and another lognormal -> weird negative second-order, eventhough inputs are independent.
For the same problem in matlab the second-order is about 1% for both cases, which is a desired reasonable result.
gnopik commentedon Feb 4, 2026
Here is a test dataset, first column is the output, the other two are inputs, one uniform and one lognormal
test_data_43.csv
and the correct indices for it (computed with Matlab package)

Ignore virtual environment venv (Simulation-Decomposition#43)
Fix code style and end-of-file issues (Simulation-Decomposition#43)
Update fix of sensitivity_indices.py, add tests for Issue Simulation-…