Latin Hypercubic sampling

class stats_arrays.LatinHypercubeRNG(params, seed=None, samples=10, **kwargs)

A random number generator that pre-calculates a sample space to draw from.


  • params : A Parameter array which gives parameters for distributions (one distribution per row).
  • seed : An integer (or array of integers) to seed the NumPy random number generator.
  • samples : An integer number of samples to construct for each distribution.
__init__(params, seed=None, samples=10, **kwargs)

x.__init__(…) initializes x; see help(type(x)) for signature


Build an array, of shape self.length rows by self.samples columns, which contains the sample space to be drawn from when doing Latin Hypercubic sampling.

Each row represents a different data point and distribution. The final sample space is self.hypercube. All distributions from uncertainty_choices are usable, and bounded distributions are also fine.


self.hypercube : Numpy array with dimensions self.length by self.samples.


Draw directly from pre-computed sample space.