SALib.sample.latin module#

SALib.sample.latin.cli_action(args)[source]#

Run sampling method

Parameters:

args (argparse namespace)

SALib.sample.latin.sample(problem, N, seed: int | Generator | None = None)[source]#

Generate model inputs using Latin hypercube sampling (LHS).

Returns a NumPy matrix containing the model inputs generated by Latin hypercube sampling. The resulting matrix contains N rows and D columns, where D is the number of parameters.

Parameters:
  • problem (dict) – The problem definition

  • N (int) – The number of samples to generate

  • 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.

References

  1. McKay, M.D., Beckman, R.J., Conover, W.J., 1979.

    A comparison of three methods for selecting values of input variables in the analysis of output from a computer code. Technometrics 21, 239-245. https://doi.org/10.2307/1268522

  2. Iman, R.L., Helton, J.C., Campbell, J.E., 1981.

    An Approach to Sensitivity Analysis of Computer Models: Part I—Introduction, Input Variable Selection and Preliminary Variable Assessment. Journal of Quality Technology 13, 174-183. https://doi.org/10.1080/00224065.1981.11978748