

def drawSample(self):
    sum = 0.0
    rndFakt = random.random()
    for g in range(self.numOGaus):
        sum += self.sigmo(self.alpha[g])
        if (rndFakt < sum):
            if (self.sigma[g] < self.minSig):
                self.sigma[g] = self.minSig
            x = random.normal(self.mue[g], self.sigma[g])
            break
    return x

dataset/ETHPy150Open pybrain/pybrain/pybrain/tools/mixtures/mogpuremax.py MixtureOfGaussians.drawSample/original