Exemple #1
0
 def resample(self):
     alphan, self._normalizer = HMMStatesEigen._messages_forwards_normalized(
             self.hmm_trans_matrix,
             self.pi_0,
             self.aBl)
     self.stateseq = HMMStatesEigen._sample_backwards_normalized(
             alphan,
             self.hmm_trans_matrix.T.copy())
Exemple #2
0
    def resample_hmm(self):
        alphan, self._normalizer = \
                HMMStatesEigen._messages_forwards_normalized(
                        self.hmm_trans_matrix,self.hmm_pi_0,self.hmm_aBl)
        self.stateseq = HMMStatesEigen._sample_backwards_normalized(
            alphan, self.hmm_trans_matrix.T.copy())
        self._map_states()

        self.alphan = alphan  # TODO remove
Exemple #3
0
    def resample_hmm(self):
        alphan, self._normalizer = \
                HMMStatesEigen._messages_forwards_normalized(
                        self.hmm_trans_matrix,self.hmm_pi_0,self.hmm_aBl)
        self.stateseq = HMMStatesEigen._sample_backwards_normalized(
                alphan,self.hmm_trans_matrix.T.copy())
        self._map_states()

        self.alphan = alphan  # TODO remove