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

Method test_randomsample

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

Source from the content-addressed store, hash-verified

102 self.lgb = LGBayesianNetwork(skel, nodedata)
103
104 def test_randomsample(self):
105 seq = self.lgb.randomsample(1)
106 ctr = 0
107 for entry in seq[0].keys():
108 self.assertTrue(seq[0][entry], float)
109 ctr = ctr + 1
110 self.assertEqual(ctr, 5)
111
112class TestTableCPDFactor(unittest.TestCase):
113

Callers

nothing calls this directly

Calls 1

randomsampleMethod · 0.45

Tested by

no test coverage detected