def _reestimate(self, stats): new_model = _BaseHMM._reestimate(self, stats) new_model['LFMparams'] = self._reestimateLFMparams(stats['gammas']) if self.verbose: print "CURRENT MODEL PARAMETERS" print "PI" print repr(new_model['pi']) print "A" print repr(new_model['A']) print "EMISSION PARAMS: " print repr(new_model['LFMparams']) return new_model
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
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
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
def _reestimate(self, stats): new_model = _BaseHMM._reestimate(self, stats) new_model['ICMparams'] = self._reestimateICMparams(stats['gammas']) return new_model