

def _logDerivsFactorSigma(self, samples, mu, invSigma, factorSigma):
    ' Compute the log-derivatives w.r.t. the factorized covariance matrix components.\n        This implementation should be faster than the one in Vanilla. '
    res = zeros((len(samples), (invSigma.numDistrParams - self.numParameters)))
    invA = inv(factorSigma)
    diagInvA = diag(diag(invA))
    for (i, sample) in enumerate(samples):
        s = dot(invA.T, (sample - mu))
        R = (outer(s, dot(invA, s)) - diagInvA)
        res[i] = triu2flat(R)
    return res

dataset/ETHPy150Open pybrain/pybrain/pybrain/optimization/distributionbased/nes.py OriginalNES._logDerivsFactorSigma/VarMisuse@31/96 `self`->`invSigma`