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

Method test_randomsample

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

Source from the content-addressed store, hash-verified

287 self.hybn = HyBayesianNetwork(self.skel, self.nd)
288
289 def test_randomsample(self):
290 sample = self.hybn.randomsample(1)[0]
291 self.assertTrue(isinstance(sample['Grade'], float))
292 self.assertTrue(isinstance(sample['Intelligence'], str))
293 self.assertEqual(sample["SAT"][-12:], 'blueberries!')
294
295class TestDynDiscBayesianNetwork(unittest.TestCase):
296

Callers

nothing calls this directly

Calls 1

randomsampleMethod · 0.45

Tested by

no test coverage detected