예제 #1
0
 def __init__(self, *args, **kwargs):
     MultiModalFunction.__init__(self, *args, **kwargs)
     self._mu0 = 2.5
     self._s = 1 - 1 / (2 * sqrt(self.xdim + 20) - 8.2)
     self._mu1 = -sqrt((self._mu0 ** 2 - 1) / self._s)
     self._signs = sign(randn(self.xdim))
     self._R1 = orth(rand(self.xdim, self.xdim))
     self._R2 = orth(rand(self.xdim, self.xdim))
     self._diags = generateDiags(100, self.xdim)
예제 #2
0
 def __init__(self, *args, **kwargs):
     MultiModalFunction.__init__(self, *args, **kwargs)
     self._opts = (rand((self.numPeaks, self.xdim)) - 0.5) * 9.8
     self._opts[0] = (rand(self.xdim) - 0.5) * 8
     alphas = [power(self.maxCond, 2 * i / float(self.numPeaks - 2)) for i in range(self.numPeaks - 1)]
     shuffle(alphas)
     self._covs = [generateDiags(alpha, self.xdim, shuffled=True) / power(alpha, 0.25) for alpha in [self.optCond] + alphas]
     self._R = orth(rand(self.xdim, self.xdim))
     self._ws = [10] + [1.1 + 8 * i / float(self.numPeaks - 2) for i in range(self.numPeaks - 1)]
예제 #3
0
 def __init__(self, *args, **kwargs):
     MultiModalFunction.__init__(self, *args, **kwargs)
     self._mu0 = 2.5
     self._s = 1 - 1 / (2 * sqrt(self.xdim + 20) - 8.2)
     self._mu1 = -sqrt((self._mu0**2 - 1) / self._s)
     self._signs = sign(randn(self.xdim))
     self._R1 = orth(rand(self.xdim, self.xdim))
     self._R2 = orth(rand(self.xdim, self.xdim))
     self._diags = generateDiags(100, self.xdim)
예제 #4
0
 def __init__(self, *args, **kwargs):
     MultiModalFunction.__init__(self, *args, **kwargs)
     print self.numPeaks, self.xdim
     self._opts = [(rand(self.xdim) - 0.5) * 8]
     self._opts.extend([(rand(self.xdim) - 0.5) * 9.8
                        for _ in range(self.numPeaks - 1)])
     alphas = [
         power(self.maxCond, 2 * i / float(self.numPeaks - 2))
         for i in range(self.numPeaks - 1)
     ]
     shuffle(alphas)
     self._covs = [
         generateDiags(alpha, self.xdim, shuffled=True) /
         power(alpha, 0.25) for alpha in [self.optCond] + alphas
     ]
     self._R = orth(rand(self.xdim, self.xdim))
     self._ws = [10] + [
         1.1 + 8 * i / float(self.numPeaks - 2)
         for i in range(self.numPeaks - 1)
     ]
예제 #5
0
 def __init__(self, *args, **kwargs):
     MultiModalFunction.__init__(self, *args, **kwargs)
     self._signs = sign(randn(self.xdim))
     self._diags = generateDiags(10, self.xdim)
     self.xopt = self._k2 * self._signs
예제 #6
0
 def __init__(self, *args, **kwargs):
     MultiModalFunction.__init__(self, *args, **kwargs)
     self._signs = sign(randn(self.xdim))
     self._diags = generateDiags(10, self.xdim)
     self.xopt = self._k2 * self._signs