import pyLHD
OLHD_example = pyLHD.OLHD_Cioppa07(m=2)orthogonal.OLHD_Lin09
orthogonal.OLHD_Lin09(OLHD, OA)
Orthogonal Latin Hypercube Design. Based on the construction method of Lin et al. (2009)
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
OLHD |
[type] | An orthogonal Latin hypercube design with run size (n) and factor size (p), and it will be coupled with the input orthogonal array | required |
OA |
[type] | An orthogonal array, with (n^2) rows, (2f) columns, (n) symbols, strength two and index unity is available, which can be denoted as OA(n^2,2f,n,2) | required |
Returns
| Type | Description |
|---|---|
| numpy.numpy.ndarray | Orthogonal Latin hypercube design with the following run size: (n^2) and the following factor size: (2fp) |
Examples: Create a 5 by 2 OLHD
Create an OA(25,6,5,2)
import numpy as np
OA_example = np.array([ [2,2,2,2,2,1],[2,1,5,4,3,5],
[3,2,1,5,4,5],[1,5,4,3,2,5],
[4,1,3,5,2,3],[1,2,3,4,5,2],
[1,3,5,2,4,3],[1,1,1,1,1,1],
[4,3,2,1,5,5],[5,5,5,5,5,1],
[4,4,4,4,4,1],[3,1,4,2,5,4],
[3,3,3,3,3,1],[3,5,2,4,1,3],
[3,4,5,1,2,2],[5,4,3,2,1,5],
[2,3,4,5,1,2],[2,5,3,1,4,4],
[1,4,2,5,3,4],[4,2,5,3,1,4],
[2,4,1,3,5,3],[5,3,1,4,2,4],
[5,2,4,1,3,3],[5,1,2,3,4,2],
[4,5,1,2,3,2] ])Construct a 25 by 12 OLHD
pyLHD.OLHD_Lin09(OLHD = OLHD_example,OA = OA_example)array([[ 12., -8., 12., -8., 7., -9., 6., -4., 6., -4., -9.,
-7.],
[ 7., -9., -7., 9., -10., -2., -9., -7., 9., 7., -5.,
-1.],
[ 10., 2., -9., -7., -11., 3., 5., 1., -7., 9., -3.,
-11.],
[ -9., -7., -1., 5., -8., -12., -7., 9., 2., -10., -4.,
-6.],
[ 4., 6., -10., -2., 2., -10., -8., -12., -5., -1., 1.,
-5.],
[ 11., -3., -5., -1., 8., 12., 3., 11., 10., 2., 4.,
6.],
[ 1., -5., 8., 12., -1., 5., -2., 10., 4., 6., 2.,
-10.],
[ 6., -4., 6., -4., 6., -4., -12., 8., -12., 8., -12.,
8.],
[ -1., 5., 7., -9., -12., 8., 2., -10., -9., -7., -6.,
4.],
[-12., 8., -12., 8., 3., 11., -6., 4., -6., 4., -11.,
3.],
[ -6., 4., -6., 4., 4., 6., 12., -8., 12., -8., -8.,
-12.],
[ 5., 1., 9., 7., -7., 9., -10., -2., 7., -9., 9.,
7.],
[ 0., 0., 0., 0., 5., 1., 0., 0., 0., 0., -10.,
-2.],
[-10., -2., -3., -11., 1., -5., -5., -1., 11., -3., -2.,
10.],
[ -5., -1., 3., 11., 12., -8., 10., 2., -11., 3., 6.,
-4.],
[ -7., 9., 10., 2., -9., -7., 9., 7., 5., 1., -7.,
9.],
[ 2., -10., -11., 3., 11., -3., 1., -5., -3., -11., 3.,
11.],
[ -8., -12., 5., 1., -6., 4., -4., -6., -10., -2., 12.,
-8.],
[ -4., -6., -8., -12., -5., -1., 8., 12., -4., -6., 10.,
2.],
[ 9., 7., -2., 10., -4., -6., 7., -9., -1., 5., 8.,
12.],
[ -3., -11., 1., -5., -2., 10., 11., -3., -2., 10., -1.,
5.],
[ -2., 10., -4., -6., -3., -11., -1., 5., 8., 12., 11.,
-3.],
[ 8., 12., 4., 6., 0., 0., 4., 6., -8., -12., 0.,
0.],
[ 3., 11., 2., -10., 9., 7., -11., 3., 1., -5., 7.,
-9.],
[-11., 3., 11., -3., 10., 2., -3., -11., 3., 11., 5.,
1.]])