orthogonal.OLHD_Ye98

orthogonal.OLHD_Ye98(m, seed=None)

Orthogonal Latin Hyercube Design. Based on the construction method of Ye (1998)

Parameters

Name Type Description Default
m int A positive integer, and it must be greater than or equal to 2 required
seed Optional[Union[int, np.random.Generator]]) If seedis an integer or None, a new numpy.random.Generator is created using np.random.default_rng(seed). If seed is already a `Generator instance, then the provided instance is used. Defaults to None. None

Raises

Type Description
ValueError If m is not greater than or equal to 2

Returns

Type Description
numpy.numpy.ndarray An orthogonal LHD with the following run size: (n=2^m + 1) and factor size: (k=2m-2)

Examples: Create an orthogonal LHD with m=4. So n=2^m+1=9 runs and k=2*m-2=4 factors

import pyLHD
pyLHD.OLHD_Ye98(m=3)
array([[ 4., -2., -1.,  3.],
       [ 2.,  4., -3., -1.],
       [ 3., -1.,  2., -4.],
       [ 1.,  3.,  4.,  2.],
       [ 0.,  0.,  0.,  0.],
       [-4.,  2.,  1., -3.],
       [-2., -4.,  3.,  1.],
       [-3.,  1., -2.,  4.],
       [-1., -3., -4., -2.]])

Create an orthogonal LHD with m=5. So n=2^m+1=17 runs and k=2*m-2=6 factors

pyLHD.OLHD_Ye98(m=4)
array([[ 2., -7., -6., -1.,  5.,  4.],
       [ 7.,  2., -3., -5., -1., -8.],
       [ 3., -6.,  7., -8., -4.,  5.],
       [ 6.,  3.,  2., -4.,  8., -1.],
       [ 4., -8., -1.,  6.,  3., -2.],
       [ 8.,  4., -5.,  3., -6.,  7.],
       [ 5., -1.,  8.,  7., -2., -3.],
       [ 1.,  5.,  4.,  2.,  7.,  6.],
       [ 0.,  0.,  0.,  0.,  0.,  0.],
       [-2.,  7.,  6.,  1., -5., -4.],
       [-7., -2.,  3.,  5.,  1.,  8.],
       [-3.,  6., -7.,  8.,  4., -5.],
       [-6., -3., -2.,  4., -8.,  1.],
       [-4.,  8.,  1., -6., -3.,  2.],
       [-8., -4.,  5., -3.,  6., -7.],
       [-5.,  1., -8., -7.,  2.,  3.],
       [-1., -5., -4., -2., -7., -6.]])