orthogonal.OLHD_Sun10

orthogonal.OLHD_Sun10(C, r, type='odd')

Orthogonal Latin Hypercube Design (OLHD). Based on the construction method of Sun et al. (2010)

Parameters

Name Type Description Default
C int A positve integer. required
r int A positve integer. required
type str Run size of design, this can be either odd or even. Defaults to ‘odd’. If (type) is ‘odd’ the run size of the OLHD will be (r2^(C+1)+1). If (type) is ‘even’ the run size of the OLHD will be (r2^(C+1)) 'odd'

Returns

Type Description
numpy.numpy.ndarray An orthogonal LHD with the following run size: (r2^(C+1)+1) if type =‘odd’, or (r2^(C+1)) if type =‘even’. The resulting columns will be (2^(C))

Examples: Create an orthogonal LHD with C=3, r=3, type = ‘odd’, so n = (3*2^(3+1) )+1 = 49 (rows) and k=2^(3)=8 (columns)

import pyLHD
pyLHD.OLHD_Sun10(C=3,r=3,type='odd')
array([[  1.,   2.,   3.,   4.,   5.,   6.,   7.,   8.],
       [  2.,  -1.,  -4.,   3.,   6.,  -5.,  -8.,   7.],
       [  3.,   4.,  -1.,  -2.,  -7.,  -8.,   5.,   6.],
       [  4.,  -3.,   2.,  -1.,  -8.,   7.,  -6.,   5.],
       [  5.,   6.,   7.,   8.,  -1.,  -2.,  -3.,  -4.],
       [  6.,  -5.,  -8.,   7.,  -2.,   1.,   4.,  -3.],
       [  7.,   8.,  -5.,  -6.,   3.,   4.,  -1.,  -2.],
       [  8.,  -7.,   6.,  -5.,   4.,  -3.,   2.,  -1.],
       [  9.,  10.,  11.,  12.,  13.,  14.,  15.,  16.],
       [ 10.,  -9., -12.,  11.,  14., -13., -16.,  15.],
       [ 11.,  12.,  -9., -10., -15., -16.,  13.,  14.],
       [ 12., -11.,  10.,  -9., -16.,  15., -14.,  13.],
       [ 13.,  14.,  15.,  16.,  -9., -10., -11., -12.],
       [ 14., -13., -16.,  15., -10.,   9.,  12., -11.],
       [ 15.,  16., -13., -14.,  11.,  12.,  -9., -10.],
       [ 16., -15.,  14., -13.,  12., -11.,  10.,  -9.],
       [ 17.,  18.,  19.,  20.,  21.,  22.,  23.,  24.],
       [ 18., -17., -20.,  19.,  22., -21., -24.,  23.],
       [ 19.,  20., -17., -18., -23., -24.,  21.,  22.],
       [ 20., -19.,  18., -17., -24.,  23., -22.,  21.],
       [ 21.,  22.,  23.,  24., -17., -18., -19., -20.],
       [ 22., -21., -24.,  23., -18.,  17.,  20., -19.],
       [ 23.,  24., -21., -22.,  19.,  20., -17., -18.],
       [ 24., -23.,  22., -21.,  20., -19.,  18., -17.],
       [  0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.],
       [ -1.,  -2.,  -3.,  -4.,  -5.,  -6.,  -7.,  -8.],
       [ -2.,   1.,   4.,  -3.,  -6.,   5.,   8.,  -7.],
       [ -3.,  -4.,   1.,   2.,   7.,   8.,  -5.,  -6.],
       [ -4.,   3.,  -2.,   1.,   8.,  -7.,   6.,  -5.],
       [ -5.,  -6.,  -7.,  -8.,   1.,   2.,   3.,   4.],
       [ -6.,   5.,   8.,  -7.,   2.,  -1.,  -4.,   3.],
       [ -7.,  -8.,   5.,   6.,  -3.,  -4.,   1.,   2.],
       [ -8.,   7.,  -6.,   5.,  -4.,   3.,  -2.,   1.],
       [ -9., -10., -11., -12., -13., -14., -15., -16.],
       [-10.,   9.,  12., -11., -14.,  13.,  16., -15.],
       [-11., -12.,   9.,  10.,  15.,  16., -13., -14.],
       [-12.,  11., -10.,   9.,  16., -15.,  14., -13.],
       [-13., -14., -15., -16.,   9.,  10.,  11.,  12.],
       [-14.,  13.,  16., -15.,  10.,  -9., -12.,  11.],
       [-15., -16.,  13.,  14., -11., -12.,   9.,  10.],
       [-16.,  15., -14.,  13., -12.,  11., -10.,   9.],
       [-17., -18., -19., -20., -21., -22., -23., -24.],
       [-18.,  17.,  20., -19., -22.,  21.,  24., -23.],
       [-19., -20.,  17.,  18.,  23.,  24., -21., -22.],
       [-20.,  19., -18.,  17.,  24., -23.,  22., -21.],
       [-21., -22., -23., -24.,  17.,  18.,  19.,  20.],
       [-22.,  21.,  24., -23.,  18., -17., -20.,  19.],
       [-23., -24.,  21.,  22., -19., -20.,  17.,  18.],
       [-24.,  23., -22.,  21., -20.,  19., -18.,  17.]])

Create an orthogonal LHD with C=3, r=3, type = ‘even’, So n = 3*2^(3+1) = 48 (rows) and k=2^(3)=8 (columns)

import pyLHD
pyLHD.OLHD_Sun10(C=3,r=3,type='even')
array([[  0.5,   1.5,   2.5,   3.5,   4.5,   5.5,   6.5,   7.5],
       [  1.5,  -0.5,  -3.5,   2.5,   5.5,  -4.5,  -7.5,   6.5],
       [  2.5,   3.5,  -0.5,  -1.5,  -6.5,  -7.5,   4.5,   5.5],
       [  3.5,  -2.5,   1.5,  -0.5,  -7.5,   6.5,  -5.5,   4.5],
       [  4.5,   5.5,   6.5,   7.5,  -0.5,  -1.5,  -2.5,  -3.5],
       [  5.5,  -4.5,  -7.5,   6.5,  -1.5,   0.5,   3.5,  -2.5],
       [  6.5,   7.5,  -4.5,  -5.5,   2.5,   3.5,  -0.5,  -1.5],
       [  7.5,  -6.5,   5.5,  -4.5,   3.5,  -2.5,   1.5,  -0.5],
       [  8.5,   9.5,  10.5,  11.5,  12.5,  13.5,  14.5,  15.5],
       [  9.5,  -8.5, -11.5,  10.5,  13.5, -12.5, -15.5,  14.5],
       [ 10.5,  11.5,  -8.5,  -9.5, -14.5, -15.5,  12.5,  13.5],
       [ 11.5, -10.5,   9.5,  -8.5, -15.5,  14.5, -13.5,  12.5],
       [ 12.5,  13.5,  14.5,  15.5,  -8.5,  -9.5, -10.5, -11.5],
       [ 13.5, -12.5, -15.5,  14.5,  -9.5,   8.5,  11.5, -10.5],
       [ 14.5,  15.5, -12.5, -13.5,  10.5,  11.5,  -8.5,  -9.5],
       [ 15.5, -14.5,  13.5, -12.5,  11.5, -10.5,   9.5,  -8.5],
       [ 16.5,  17.5,  18.5,  19.5,  20.5,  21.5,  22.5,  23.5],
       [ 17.5, -16.5, -19.5,  18.5,  21.5, -20.5, -23.5,  22.5],
       [ 18.5,  19.5, -16.5, -17.5, -22.5, -23.5,  20.5,  21.5],
       [ 19.5, -18.5,  17.5, -16.5, -23.5,  22.5, -21.5,  20.5],
       [ 20.5,  21.5,  22.5,  23.5, -16.5, -17.5, -18.5, -19.5],
       [ 21.5, -20.5, -23.5,  22.5, -17.5,  16.5,  19.5, -18.5],
       [ 22.5,  23.5, -20.5, -21.5,  18.5,  19.5, -16.5, -17.5],
       [ 23.5, -22.5,  21.5, -20.5,  19.5, -18.5,  17.5, -16.5],
       [ -0.5,  -1.5,  -2.5,  -3.5,  -4.5,  -5.5,  -6.5,  -7.5],
       [ -1.5,   0.5,   3.5,  -2.5,  -5.5,   4.5,   7.5,  -6.5],
       [ -2.5,  -3.5,   0.5,   1.5,   6.5,   7.5,  -4.5,  -5.5],
       [ -3.5,   2.5,  -1.5,   0.5,   7.5,  -6.5,   5.5,  -4.5],
       [ -4.5,  -5.5,  -6.5,  -7.5,   0.5,   1.5,   2.5,   3.5],
       [ -5.5,   4.5,   7.5,  -6.5,   1.5,  -0.5,  -3.5,   2.5],
       [ -6.5,  -7.5,   4.5,   5.5,  -2.5,  -3.5,   0.5,   1.5],
       [ -7.5,   6.5,  -5.5,   4.5,  -3.5,   2.5,  -1.5,   0.5],
       [ -8.5,  -9.5, -10.5, -11.5, -12.5, -13.5, -14.5, -15.5],
       [ -9.5,   8.5,  11.5, -10.5, -13.5,  12.5,  15.5, -14.5],
       [-10.5, -11.5,   8.5,   9.5,  14.5,  15.5, -12.5, -13.5],
       [-11.5,  10.5,  -9.5,   8.5,  15.5, -14.5,  13.5, -12.5],
       [-12.5, -13.5, -14.5, -15.5,   8.5,   9.5,  10.5,  11.5],
       [-13.5,  12.5,  15.5, -14.5,   9.5,  -8.5, -11.5,  10.5],
       [-14.5, -15.5,  12.5,  13.5, -10.5, -11.5,   8.5,   9.5],
       [-15.5,  14.5, -13.5,  12.5, -11.5,  10.5,  -9.5,   8.5],
       [-16.5, -17.5, -18.5, -19.5, -20.5, -21.5, -22.5, -23.5],
       [-17.5,  16.5,  19.5, -18.5, -21.5,  20.5,  23.5, -22.5],
       [-18.5, -19.5,  16.5,  17.5,  22.5,  23.5, -20.5, -21.5],
       [-19.5,  18.5, -17.5,  16.5,  23.5, -22.5,  21.5, -20.5],
       [-20.5, -21.5, -22.5, -23.5,  16.5,  17.5,  18.5,  19.5],
       [-21.5,  20.5,  23.5, -22.5,  17.5, -16.5, -19.5,  18.5],
       [-22.5, -23.5,  20.5,  21.5, -18.5, -19.5,  16.5,  17.5],
       [-23.5,  22.5, -21.5,  20.5, -19.5,  18.5, -17.5,  16.5]])