示例#1
0
 def get_bic(self):
     """returns the Bayesian Information Criteria"""
     sequence_length = sum(
         len(self.get_param_value("lht", locus=l).index)
         for l in self.locus_names)
     lnL = self.get_log_likelihood()
     nfp = self.get_num_free_params()
     return bic(lnL, nfp, sequence_length)
示例#2
0
 def test_bic(self):
     """correctly compute BIC"""
     # against hand calculated
     assert_allclose(bic(-9.7039, 4, 13), 29.6675974298)
 def test_bic(self):
     """correctly compute BIC"""
     # against hand calculated
     self.assertFloatEqual(bic(-9.7039, 4, 13), 29.6675974298)