MCPcopy Create free account
hub / github.com/CyberPoint/libpgm / test_sumproductve

Method test_sumproductve

tests/run_unit_tests.py:211–217  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

209 self.assertTrue(abs(self.fn.factorlist[index].vals[x] - exp[x]) < .01)
210
211 def test_sumproductve(self):
212 input = ["Difficulty", "Grade", "Intelligence", "SAT"]
213 self.fn.refresh()
214 self.fn.sumproductve(input)
215 exp = [.498, .502]
216 for x in range(2):
217 self.assertTrue(abs(self.fn.factorlist.vals[x] - exp[x]) < .01)
218
219 def test_condprobve(self):
220 evidence = dict(Grade='C', SAT='highscore')

Callers

nothing calls this directly

Calls 2

refreshMethod · 0.80
sumproductveMethod · 0.80

Tested by

no test coverage detected