

def _calcBatchUpdate(self, fitnesses):
    xdim = self.numParameters
    invSigma = inv(self.sigma)
    samples = self.allSamples[(- self.batchSize):]
    phi = zeros((self.batchSize, (self.numDistrParams + 1)))
    phi[:, :xdim] = self._logDerivsX(samples, self.x, invSigma)
    phi[:, xdim:(- 1)] = self._logDerivsFactorSigma(samples, self.x, invSigma, self.factorSigma)
    phi[:, (- 1)] = 1
    update = dot(pinv2(phi), fitnesses)[:(- 1)]
    return update

dataset/ETHPy150Open pybrain/pybrain/pybrain/optimization/distributionbased/nes.py OriginalNES._calcBatchUpdate/original