SALib.sample.shapley module#
- SALib.sample.shapley.cli_action(args)[source]#
Generate a Shapley trajectory design from command-line arguments.
- SALib.sample.shapley.sample(problem: dict, N: int, seed: int | Generator | None = None) ndarray[source]#
Generate inputs for Goda’s Shapley effects estimator.
The method draws two independent input vectors for each Monte Carlo replication. A random permutation then defines a trajectory that replaces one coordinate at a time from the first vector with the corresponding coordinate from the second. The resulting matrix contains
N * (D + 1)rows andDcolumns.Results from these model inputs are intended to be used with
SALib.analyze.shapley.analyze().Notes
Goda’s estimator assumes mutually independent input variables. SALib problem definitions specify marginal distributions, so this sampler draws every input independently. Grouped parameters are not supported.
- Parameters:
- Returns:
Model inputs arranged as
Nconsecutive trajectories.- Return type:
References
Goda, T. (2021). A simple algorithm for global sensitivity analysis with Shapley effects. Reliability Engineering & System Safety, 213, 107702. https://doi.org/10.1016/j.ress.2021.107702