Probability of improvement is the simplest Bayesian optimization rule. It scores a candidate by the chance that its true value lands below the best so far. It ignores how much the improvement would be, which is the weakness expected improvement fixes.
Implement probability_of_improvement(mu, sigma, best) for minimization, returning the standard normal CDF of (best - mu) / sigma.
sigma is positive.Compute z = (best - mu) / sigma and return Phi(z) using math.erf.
No results yet
Run your code to check it against the examples, or submit to run every test.