Example #1
0
 def log_likelihood_biased(self, count_matrix, transition_matrix):
     """ Evaluate AMM likelihood. """
     ll_unbiased = msmest.log_likelihood(count_matrix, transition_matrix)
     ll_bias = -np.sum(self.experimental_measurement_weights * (self.m_hat - self.experimental_measurements) ** 2.)
     return ll_unbiased + ll_bias
Example #2
0
 def _log_likelihood_biased(C, T, E, mhat, ws):
     """ Evaluate AMM likelihood. """
     ll_unbiased = log_likelihood(C, T)
     ll_bias = -_np.sum(ws * (mhat - E)**2.)
     return ll_unbiased + ll_bias
 def test_count_matrix(self):
     """Small test cases"""
     log = log_likelihood(self.C1, self.T1)
     assert_allclose(log, np.log(0.8 * 0.2**3 * 0.9**3 * 0.1))