liveBook · Manning

Random search

As explained in Bayesian Optimization in Action

An optimization strategy that evaluates randomly selected candidate locations without adaptively modeling the objective.

Random search optimizes a black-box objective by selecting candidate points randomly within its domain and evaluating them. Uniform sampling gives every location equal probability. section 1.2.4

The basic procedure is:

  • Sample candidate locations from the objective domain, usually uniformly. section 1.2.4
  • Evaluate the objective at each sampled location until the evaluation budget is exhausted. section 1.2.4
  • Return the sampled point with the best observed objective value. section 1.2.4

One-dimensional objective

For an objective defined from −5 to 5 with ten permitted evaluations, uniformly sampled points may cluster near an unpromising region. One trial found its best point near x = 4, with f(x) = 3.38, while potentially wasting evaluations around 0. section 1.2.4

Figure 1.6 The objective function that is to be maximized, where random search wastes resources on unpromising regions

Visualizes how random sampling can spend valuable evaluations in regions that produce poor objective values. section 1.2.4

How Bayesian Optimization in Action covers it

How deep it goes
Defines uniform and non-uniform sampling and illustrates resource waste, but stops short of implementation details.
Examples
Uses a one-dimensional function on [−5, 5], ten evaluations, and a best observed point near x = 4.
What you can do after
Apply random search by sampling candidate locations, evaluating them, and retaining the best observed value.
How it connects
Contrasts random search with grid search and Bayesian optimization.

Also explained in

Compare how 2 books explain random search →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bayesian Optimization in Action. The section links point to the parts of the book it draws on.