예제 #1
0
 def _reestimate(self,stats,observations):
     '''
     Required extension of _reestimate. 
     Adds a re-estimation of the model parameter 'B'.
     '''
     # re-estimate A, pi
     new_model = _BaseHMM._reestimate(self,stats,observations) #@UndefinedVariable
     
     # re-estimate the discrete probability of the observable symbols
     B_new = self._reestimateB(observations,stats['gamma'])
     
     new_model['B'] = B_new
     
     return new_model
예제 #2
0
    def _reestimate(self, stats, observations):
        '''
        Required extension of _reestimate. 
        Adds a re-estimation of the model parameter 'B'.
        '''
        # re-estimate A, pi
        new_model = _BaseHMM._reestimate(self, stats,
                                         observations)  #@UndefinedVariable

        # re-estimate the discrete probability of the observable symbols
        B_new = self._reestimateB(observations, stats['gamma'])

        new_model['B'] = B_new

        return new_model
예제 #3
0
	def _reestimate(self,stats,observations):
		'''
		Required extension of _reestimate. 
		Adds a re-estimation of the mixture parameters 'w', 'means', 'covars'.
		'''        
		# re-estimate A, pi
		new_model = _BaseHMM._reestimate(self,stats,observations) #@UndefinedVariable

		# re-estimate the continuous probability parameters of the mixtures
		w_new, means_new, covars_new = self._reestimateMixtures(observations,stats['gamma_mix'])

		new_model['w'] = w_new
		new_model['means'] = means_new
		new_model['covars'] = covars_new
		return new_model
예제 #4
0
    def _reestimate(self, stats, observations):
        '''
        Required extension of _reestimate. 
        Adds a re-estimation of the mixture parameters 'w', 'means', 'covars'.
        '''
        # re-estimate A, pi
        new_model = _BaseHMM._reestimate(self, stats,
                                         observations)  #@UndefinedVariable

        # re-estimate the continuous probability parameters of the mixtures
        w_new, means_new, covars_new = self._reestimateMixtures(
            observations, stats['gamma_mix'])

        new_model['w'] = w_new
        new_model['means'] = means_new
        new_model['covars'] = covars_new

        return new_model