示例#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)