Skip to content
Snippets Groups Projects

implement 'npoints' strategy for the 'BalancingLearner'

Merged Bas Nijholt requested to merge balancing_learner_points into master
@@ -24,15 +24,17 @@ class SKOptLearner(Optimizer, BaseLearner):
def __init__(self, function, **kwargs):
self.function = function
self.pending_points = set()
super().__init__(**kwargs)
def tell(self, x, y, fit=True):
def tell(self, x, y, fit=True):
self.pending_points.dicard(x)
super().tell([x], y, fit)
def tell_pending(self, x):
# 'skopt.Optimizer' takes care of points we
# have not got results for.
pass
self.pending_points.add(x)
def remove_unfinished(self):
pass
Loading