Design of Experiments

This module implements functionality related to the design of (computer) experiments.

Latin Hyper-cube Designs

Latin hyper-cube designs approximate samples from a uniform distribution attempting to keep the degeneracy of the samples low.

best.design.lhs(n, k[, seed=lhs_seed()])

Fill an n\times k matrix with a latin hyper-cube design.

Parameters:
  • n (int) – The number of samples.
  • k (int) – The number of dimensions.
  • seed (int) – A random seed. If not specified then it is taken from best.design.lhs_seed().
Returns:

A latin hyper-cube design.

Return type:

2D numpy array.

Here is an example:

from best.design import lhs
X = lhs(10, 2)
print X

This should print something similar to:

[[ 0.55  0.65]
 [ 0.25  0.75]
 [ 0.85  0.95]
 [ 0.05  0.45]
 [ 0.15  0.35]
 [ 0.65  0.45]
 [ 0.25  0.15]
 [ 0.05  0.75]
 [ 0.35  0.55]
 [ 0.85  0.95]]
best.design.lhs_seed()

Produce a random seed to be used in best.design.lhs().

Returns:A random seed.
Return type:int

Table Of Contents

Previous topic

Gaussian Process Regression

Next topic

Inverse Problems

This Page