Ask-and-tell minimization of a noisy loss over a parameter box. More...
#include <gpr/bo/ParameterSearch.h>
Public Member Functions | |
| ParameterSearch (std::vector< ParameterBound > bounds, ParameterSearchConfig config={}) | |
| int | dimension () const noexcept |
| int | observationCount () const noexcept |
| const ParameterSearchConfig & | config () const noexcept |
| const std::vector< ParameterBound > & | bounds () const noexcept |
| void | observe (const ParameterObservation &observation) |
| Record one evaluated parameter vector. | |
| void | observe (const Eigen::VectorXd ¶meters, double loss) |
| Record a loss observed with the shared noise variance. | |
| void | observe (const Eigen::VectorXd ¶meters, double loss, double noise_variance) |
| Record a loss observed with its own noise variance. | |
| std::vector< Eigen::VectorXd > | propose (int count) |
| Propose up to count parameter vectors to evaluate next. | |
| ParameterSearchResult | best () |
| The incumbent, its loss and the number of observations. | |
| void | predict (const Eigen::MatrixXd ¶meters, Eigen::VectorXd &mean, Eigen::VectorXd &standard_deviation) |
| Surrogate prediction of the latent loss, in the units of the observed losses, at each row of parameters. | |
| void | predictFeasibility (const Eigen::MatrixXd ¶meters, Eigen::VectorXd &probability) |
| Probability of feasibility P(c(x) <= 0) at each row of parameters. One everywhere while no constraint value is observed. | |
| const ScalarHyperparameters & | hyperparameters () |
| Hyperparameters of the loss surrogate, on the unit cube and for the standardized loss. | |
Ask-and-tell minimization of a noisy loss over a parameter box.
The caller evaluates the loss. observe() records one result, with its noise variance when the caller knows it, and propose() returns the next parameter vectors to run. The surrogate is a ScalarSurrogate on the unit cube, fitted to losses standardized to zero mean and unit variance.
propose(q) builds a batch with the constant liar heuristic of Ginsbourger, Le Riche and Carraro (2010): after each pick the surrogate is conditioned on a made-up observation at that point, whose value is the incumbent (the "CL-min" lie), and the acquisition is maximized again. The hyperparameters are not refitted on the lies. The q points can then be evaluated together, for example in one allocation.
An observation may carry a constraint value c(x), feasible when c(x) <= 0. A second scalar GP models c, and expected improvement is multiplied by the probability of feasibility P(c(x) <= 0), as in Gardner et al. (2014) and Gelbart, Snoek and Adams (2014). The feasibility model is a GP regression on the constraint value, or on labels -1 (feasible) and +1 (infeasible) when only the outcome is known. It is not a classification likelihood: with labels the probability is a heuristic score and is not calibrated.
With ParameterSearchConfig::noisy_objective the incumbent is the smallest posterior mean at the evaluated points instead of the smallest observed loss: the plug-in form of expected improvement for a noisy oracle, reviewed by Picheny, Wagner and Ginsbourger (2013). One lucky noisy run then does not set the bar every later candidate has to beat.
Definition at line 764 of file ParameterSearch.h.
|
inlineexplicit |
Definition at line 766 of file ParameterSearch.h.
|
inlinenodiscard |
The incumbent, its loss and the number of observations.
The incumbent is the feasible evaluated parameter vector with the smallest loss. With noisy_objective it is the one with the smallest posterior mean, and loss is that mean.
| std::logic_error | without a feasible observation. |
Definition at line 946 of file ParameterSearch.h.
|
inlinenodiscardnoexcept |
Definition at line 807 of file ParameterSearch.h.
|
inlinenodiscardnoexcept |
Definition at line 802 of file ParameterSearch.h.
|
inlinenodiscardnoexcept |
Definition at line 792 of file ParameterSearch.h.
|
inlinenodiscard |
Hyperparameters of the loss surrogate, on the unit cube and for the standardized loss.
| std::logic_error | without an observed loss. |
Definition at line 995 of file ParameterSearch.h.
|
inlinenodiscardnoexcept |
Definition at line 797 of file ParameterSearch.h.
|
inline |
Record a loss observed with the shared noise variance.
Definition at line 861 of file ParameterSearch.h.
|
inline |
Record a loss observed with its own noise variance.
Definition at line 870 of file ParameterSearch.h.
|
inline |
Record one evaluated parameter vector.
The parameters are moved to the lattice of their axes and clamped to the box. Either every observation carries a noise variance or none does; a mixture throws std::invalid_argument. A run that produced no loss is recorded with a non-finite loss and a positive constraint: it informs the feasibility model only.
Definition at line 821 of file ParameterSearch.h.
|
inline |
Surrogate prediction of the latent loss, in the units of the observed losses, at each row of parameters.
| std::logic_error | without an observed loss. |
Definition at line 966 of file ParameterSearch.h.
|
inline |
Probability of feasibility P(c(x) <= 0) at each row of parameters. One everywhere while no constraint value is observed.
| std::logic_error | without observations. |
Definition at line 982 of file ParameterSearch.h.
|
inlinenodiscard |
Propose up to count parameter vectors to evaluate next.
Without observations the points are the next ones of a Halton sequence. Otherwise they maximize the acquisition one after the other under the constant liar. Before any feasible loss is known the acquisition is the probability of feasibility alone. Fewer than count vectors come back when the box holds fewer unevaluated lattice points.
Definition at line 894 of file ParameterSearch.h.