Where you look matters. Design your evaluation points to maximally cover the design space with minimum waste.
When each function evaluation is expensive (running a CFD simulation, building a physical prototype), you cannot afford to sample randomly. You need a sampling plan — a strategic arrangement of evaluation points that maximally covers the design space.
The simplest plan: place points on a regular grid. With k levels per variable and n variables, you need kn points. This grows exponentially — the curse of dimensionality.
Random sampling: Sample points uniformly at random. Simple but can leave large gaps and create clusters.
Stratified sampling: Divide the space into strata (sub-regions) and sample one point from each. This guarantees coverage while retaining some randomness. Latin hypercube sampling is the most popular form.
A Latin hypercube sample (LHS) of m points in n dimensions divides each dimension into m equal intervals and ensures exactly one point falls in each interval along every dimension.
This guarantees uniform projection: when projected onto any single axis, the points are evenly spaced. The positions within each interval are randomized.
How do you measure whether a sampling plan is "good"? Two common metrics:
| Metric | Definition | Optimizes For |
|---|---|---|
| Maximin distance | Maximize the minimum pairwise distance | No two points too close |
| Morris-Mitchell Φq | Φq = (∑di−q)1/q | Penalizes small distances heavily |
The Morris-Mitchell criterion is optimized over multiple values of q, then the worst case is taken. This gives a robust measure of space-filling quality.
Sometimes you have a set of candidate points X and need to select a subset S ⊂ X of size m that best fills X. Two heuristic approaches:
| Method | Strategy |
|---|---|
| Greedy | Start with one point, repeatedly add the point that most reduces the maximum gap |
| Exchange | Start with a random subset, repeatedly swap pairs to improve the filling metric |
Quasi-random sequences (low-discrepancy sequences) are deterministic sequences that fill space more uniformly than pseudo-random numbers. They achieve O(1/m) error convergence for numerical integration, compared to O(1/√m) for random Monte Carlo.
The simplest method: additive recurrence with step c = (√5−1)/2 (the golden ratio conjugate). Each dimension uses a different irrational step: √2, √3, √5, etc.
Two widely-used quasi-random sequences:
| Sequence | Construction | Character |
|---|---|---|
| Halton | Base-b expansion in reverse; different base per dimension | Simple, good up to ~20 dims |
| Sobol | Binary fractions using direction numbers from primitive polynomials | Better high-dim coverage, more complex |
Sobol sequences are generally preferred for high-dimensional problems because they maintain better uniformity as dimensionality increases. Halton sequences can show correlation patterns in high dimensions.
| Method | Type | Best For |
|---|---|---|
| Full factorial | Grid | Low dimensions only (≤ 3) |
| Latin hypercube | Stratified | General-purpose, any dimension |
| Maximin LHS | Optimized stratified | Best coverage with m points |
| Sobol sequence | Quasi-random | High-dim, numerical integration |
| Halton sequence | Quasi-random | Simple, moderate dimensions |