def __init__(self, strategy, cap=None, name=None): name = "Random" if name is None else name self.leaf = None from threading import Event # used in on_start, to continue when we have a leaf. self.first_split = Event() Heuristic.__init__(self, strategy, name=name)
def __init__(self, strategy, cap=3, radius=1. / 100, new=1, axes='one'): Heuristic.__init__( self, strategy, cap=cap, name="Nearby %.3f/%s" % (radius, axes)) self.radius = radius self.new = new self.axes = axes self._depends_on = [Best]
def __init__(self, strategy, diameter=1. / 10, prob=None): Heuristic.__init__(self, strategy, name="Extremal") import numpy as np if prob is None: prob = (1, .2, .2, 1) prob = np.array(prob) / float(np.sum(prob)) self.probabilities = prob.cumsum() self.diameter = diameter # inside the box or around zero self.vals = None
def __init__(self, strategy, div): """ Args: - `div`: number of divisions, positive integer. """ cap = div Heuristic.__init__(self, strategy, cap=cap, name="Latin Hypercube") if not isinstance(div, int): raise Exception("LH: div needs to be an integer") self.div = div
def __init__(self, strategy, k=0.1): Heuristic.__init__(self, strategy) self.k = k self.logger = self.config.get_logger("WAvg")
def __init__(self, strategy): Heuristic.__init__(self, strategy, cap=1) self.logger = self.config.get_logger("LBFGS")
def __init__(self, strategy): Heuristic.__init__(self, strategy, name="Center", cap=1)
def __init__(self, strategy): Heuristic.__init__(self, strategy, name="Zero", cap=1)