liveBook · Manning

Black box

As explained in Experimentation for Engineers

A function or system whose internal process is not known while its inputs and outputs are observable.

A black box is a function or system whose internal process is unknown or deliberately ignored while its inputs and outputs remain observable. A trading system can be treated this way: provide an exchange and observe execution_cost, without modeling every interaction among traders, exchanges, and customers. section 2.1.1

Trading simulator

The simulator accepts an exchange name and returns a noisy execution cost. With np.random.seed(17), trading_system("ASDAQ") returns 12.28 mips; changing the seed can change the result. The seed makes a stochastic black-box measurement reproducible for comparison. section 2.1.1

Black-box treatment is useful when internal dynamics are complicated, unavailable, or irrelevant to the experiment. A parameterized JIT compiler can therefore be evaluated through parameter values and measured CPU times alone, even when measurements fluctuate because of other processes and caching. section 6.1.1

Black-box reasoning changes what can be optimized and how:

  • Bayesian optimization searches for global optima using measurements without relying on the system's internal dynamics. section 6.1.1
  • A/B testing, response-surface methodology, and multi-armed bandits can optimize black-box systems, but are not generally called optimizers because they are not automated. section 6.1.1
  • Systems with observable actions, contexts, and rewards expose more structure than a pure input-measurement interface and support different optimization strategies. section 6.1.1

How Experimentation for Engineers covers it

How deep it goes
Defines observable inputs and outputs, demonstrates measurement noise, and deliberately stops short of reasoning about internal dynamics.
Examples
Uses a noisy trading simulator and a noisy JIT CPU-time simulator, with seeded randomness for reproducible measurements.
What you can do after
Evaluate systems through measured outputs and apply Bayesian optimization when internal dynamics are unavailable or unimportant.
How it connects
Connects black boxes to A/B testing, response-surface methodology, multi-armed bandits, contextual bandits, and Bayesian optimization.

Also explained in

Compare how 6 books explain black box →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Experimentation for Engineers. The section links point to the parts of the book it draws on.