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

Method test_specificquery

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

Source from the content-addressed store, hash-verified

226 self.assertTrue(abs(self.fn.factorlist.vals[x] - exp[x]) < .01)
227
228 def test_specificquery(self):
229 evidence = dict(Difficulty='easy')
230 query = dict(Grade=['A', 'B'])
231 self.fn.refresh()
232 answer = self.fn.specificquery(query, evidence)
233 self.assertTrue(abs(answer - .784) < .01)
234
235 def test_gibbssample(self):
236 evidence = dict(Letter='weak')

Callers

nothing calls this directly

Calls 2

refreshMethod · 0.80
specificqueryMethod · 0.45

Tested by

no test coverage detected