

def _optimize(self, init=None):
    if (not init):
        init = self._get_random_point()

    def z(x):
        y = x.copy().reshape((- 1), self.n_dims)
        (s, v) = self.model.predict(y, kern=(np.sum(self._kerns).copy() + self._kernb.copy()))
        return (- (s + v).flatten())
    return minimize(z, init, bounds=(init.n_dims * [(0.0, 1.0)]), options={
        'maxiter': self.max_iter,
        'disp': 0,
    }).x

dataset/ETHPy150Open msmbuilder/osprey/osprey/strategies.py GP._optimize/VarMisuse@125/138 `self`->`init`