← Teach it back (generation)⌂ Fifty Evaluations to Find the Best: Bayesian OptimizationGoing deeper (the books) →
Part 7 · Keep Learning
Build it yourself (transfer)
The repo contains a tutorial at tutorials/bayesian-optimization/: a numpy
skeleton of everything the maths sections derived — the RBF kernel, the GP posterior,
closed-form EI, UCB, and the full BO loop — with implementations replaced by TODOs and a
pytest suite that knows the right answers (exact values from the quizzes, plus an integration
test where your loop must beat random search):
cd tutorials/bayesian-optimization python3 -m pytest -q # red until your implementations are right
When the suite is green you have not read Bayesian optimization — you have written it.
Stuck on one function? solutions/ has a reference; peek at one function, not the
file.