예제 #1
0
 def test_from_log(self):
     f = Factor(self.bn, 'Earthquake')
     f.to_log()
     f.from_log()
     self.assertListEqual(list(f.cpt), [0.998, 0.002])
예제 #2
0
 def test_from_log(self):
     f = Factor(self.bn, "Earthquake")
     f.to_log()
     f.from_log()
     self.assertListEqual(list(f.cpt), [0.998, 0.002])
예제 #3
0
 def test_to_log(self):
     f = Factor(self.bn, 'Earthquake')
     f.to_log()
     self.assertEqual(round(sum(f.cpt), 4), -6.2166)
예제 #4
0
 def test_to_log(self):
     f = Factor(self.bn, "Earthquake")
     f.to_log()
     self.assertEqual(round(sum(f.cpt), 4), -6.2166)