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

Method test_condprobve

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

Source from the content-addressed store, hash-verified

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')
221 query = dict(Intelligence='high')
222 self.fn.refresh()
223 self.fn.condprobve(query, evidence)
224 exp = [.422, .578]
225 for x in range(2):
226 self.assertTrue(abs(self.fn.factorlist.vals[x] - exp[x]) < .01)
227
228 def test_specificquery(self):
229 evidence = dict(Difficulty='easy')

Callers

nothing calls this directly

Calls 2

refreshMethod · 0.80
condprobveMethod · 0.80

Tested by

no test coverage detected