in bayesmark/builtin_opt/scikit_optimizer.py [0:0]
def observe(self, X, y):
"""Send an observation of a suggestion back to the optimizer.
Parameters
----------
X : list of dict-like
Places where the objective function has already been evaluated.
Each suggestion is a dictionary where each key corresponds to a
parameter being optimized.
y : array-like, shape (n,)
Corresponding values where objective has been evaluated
"""
# Supposedly skopt can handle blocks, but not sure about interface for
# that. Just do loop to be safe for now.
for xx, yy in zip(X, y):
# skopt needs lists instead of dicts
xx = [xx[dim_name] for dim_name in self.dimensions_list]
# Just ignore, any inf observations we got, unclear if right thing
if np.isfinite(yy):
self.skopt.tell(xx, yy)