Example #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])
Example #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])
Example #3
0
	def test_to_log(self):
		f = Factor(self.bn,'Earthquake')
		f.to_log()
		self.assertEqual(round(sum(f.cpt),4),-6.2166)
Example #4
0
	def test_to_log(self):
		f = Factor(self.bn,'Earthquake')
		f.to_log()
		self.assertEqual(round(sum(f.cpt),4),-6.2166)