def hmmBaumWelchRestarts(nRuns, stopping, obs, parallel=True): '''Performs the baum welch nRuns times stopping when the likelihood changes by less than stopping''' models = [HMM.randomStudent() for _ in xrange(nRuns)] return baumWelchRestarts(models, obs, stopping, parallel)
def randomStudent(cls, nKinds): """ Returns a random student HMMKind """ hmms = [HMM.randomStudent() for _ in xrange(nKinds)] pKinds = randomDist(nKinds) return HMMKind(hmms, pKinds)