

def learn(self, x, y):
    norm = zeros(self.numOGaus)
    nOver = self.getGaus(self.alpha, self.mue, self.sigma, x)
    for g in range(self.numOGaus):
        norm[g] = (self.getStND(x, self.mue[g], self.sigma[g]) / nOver)
    self.baseline = ((0.99 * self.baseline) + (0.01 * y))
    if (y > self.best):
        self.best = y
    fakt = ((y - self.baseline) / (self.best - self.baseline))
    if (fakt < (- 1.0)):
        fakt = (- 1.0)
    sigmoA = self.sigmo(self.alpha)
    self.alpha += (((((self.alphaA * self.propFakt) * sigmoA) * (1.0 - sigmoA)) * fakt) * norm)
    sigmoA = self.sigmo(self.alpha)
    sigmoA /= sum(sigmoA)
    self.alpha = self.invSigmo(sigmoA)
    sigmoA = self.sigmo(self.alpha)
    nOver.mue += ((((self.alphaM * fakt) * (x - self.mue)) * sigmoA) * norm)
    if (fakt > 0.0):
        self.sigma += (((((self.alphaS * fakt) * (((x - self.mue) ** 2) - (self.sigma ** 2))) / self.sigma) * sigmoA) * norm)

dataset/ETHPy150Open pybrain/pybrain/pybrain/tools/mixtures/mogpuremax.py MixtureOfGaussians.learn/VarMisuse@252/301 `self`->`nOver`