From 27bd00244c977b206fbf6bfab0ab2fc8ae9238e7 Mon Sep 17 00:00:00 2001 From: Brummel Date: Wed, 17 Jun 2026 10:12:19 +0200 Subject: [PATCH] Add 'Grid Search' (parameter-search cluster) --- Grid-Search.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Grid-Search.md diff --git a/Grid-Search.md b/Grid-Search.md new file mode 100644 index 0000000..212c39f --- /dev/null +++ b/Grid-Search.md @@ -0,0 +1,56 @@ +# Grid Search + +**Grid search** is the exhaustive evaluation of every combination drawn from a +*manually specified, discrete value set per parameter* — the Cartesian product of +those sets. [L] It is the most direct search: enumerate the lattice, evaluate +every node, keep the best. + +## Cost: the product of the axes + +For $d$ parameters, where parameter $i$ contributes $k_i$ distinct values, the +grid has + +$$N_{\text{grid}} = \prod_{i=1}^{d} k_i$$ + +points. [L] Because the count is a *product*, every added parameter multiplies the +work. In the simplest case of $d$ binary parameters this is already $2^{d}$, +exponential in the number of parameters — an instance of the **curse of +dimensionality**. [L] Ten parameters at ten values each is ten billion +evaluations; the grid becomes unaffordable long before it is fine-grained enough. + +## Properties + +- **Complete within the lattice, but only the lattice.** Grid search finds the + best *node it enumerates*, but the resolution is chosen in advance; an optimum + that falls *between* grid lines is unreachable. [L] +- **Deterministic and reproducible.** The same grid yields the same point set in + the same order, with no randomness to seed. [L] +- **Independent evaluations.** No grid point depends on another's result, so the + whole grid is + [embarrassingly parallel](Evaluation-Dependency-and-Parallelism). [L] +- **Wasteful in high dimensions.** When only a few parameters affect the + objective, grid search still spends its entire budget refining a coarse lattice + along the parameters that do not matter. [C] + +## When grid search fits + +Grid search is a reasonable default for **few parameters (about three or fewer)** +over **small, known discrete value sets**, or when completeness over a specific +lattice is itself the goal (e.g. a reproducible reference sweep). [C] Beyond a +handful of dimensions, [random search](Random-Search) or an +[adaptive method](Adaptive-Search) covers the space far more economically. + +## Claim legend + +- **[L]** law / exact — a definition, identity, or theorem that does not vary. +- **[C]** convention — a practitioner rule of thumb that varies by context. + +## References + +- *Hyperparameter optimization* (Grid search section). Wikipedia. + +- *Curse of dimensionality.* Wikipedia. + +- Bergstra, J. & Bengio, Y. (2012). *Random Search for Hyper-Parameter + Optimization.* JMLR, 13, 281–305. +