Skip to main content
`Ctrl`+`K`

# SALib.sample.finite_diff module

SALib.sample.finite_diff.cli_action(args)

  Run sampling method

  Parameters:

    args (argparse namespace)

SALib.sample.finite_diff.cli_parse(parser)

  Add method specific options to CLI parser.

  Parameters:

    parser (argparse object)

  Return type:

    Updated argparse object

SALib.sample.finite_diff.sample(problem: Dict, N: int, delta: float = 0.01, seed: int | Generator | None = None, skip_values: int = 1024) → ndarray

  Generate matrix of samples for Derivative-based Global Sensitivity Measure (DGSM).

  Start from a QMC (Sobol’) sequence and finite difference with delta % steps

  Parameters:

    - problem (dict) – SALib problem specification

    - N (int) – Number of samples

    - delta (float) – Finite difference step size (percent)

    - seed ({None, int, numpy.random.Generator}, optional) – If seed is None the numpy.random.Generator generator is used. If seed is an int, a new `Generator` instance is used, seeded with seed. If seed is already a `Generator` instance then that instance is used. Default is None.

    - skip_values (int) – How many values of the Sobol sequence to skip

  Returns:

    np.array

  Return type:

    DGSM sequence

  References

  1. Sobol’, I.M., Kucherenko, S., 2009. Derivative based global sensitivity measures and their link with global sensitivity indices. Mathematics and Computers in Simulation 79, 3009-3017. https://doi.org/10.1016/j.matcom.2009.01.023

  2. Sobol’, I.M., Kucherenko, S., 2010. Derivative based global sensitivity measures. Procedia - Social and Behavioral Sciences 2, 7745-7746. https://doi.org/10.1016/j.sbspro.2010.05.208