示例#1
0
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)
示例#2
0
    def randomStudent(cls, nKinds):
        """ Returns a random student HMMKind """
        hmms = [HMM.randomStudent() for _ in xrange(nKinds)]
        pKinds = randomDist(nKinds)

        return HMMKind(hmms, pKinds)