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

Method test_randomsample

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

Source from the content-addressed store, hash-verified

79 self.instance = DiscreteBayesianNetwork(skel, nodedata)
80
81 def test_randomsample(self):
82 randomsample = self.instance.randomsample(5)
83 self.assertTrue(randomsample[0]["Difficulty"] == 'easy' or randomsample[0]["Difficulty"] == 'hard')
84 for key in randomsample[0].keys():
85 self.assertTrue(randomsample[0][key] != "default")
86
87 def test_randomsamplewithevidence(self):
88 evidence = dict(Difficulty='easy')

Callers

nothing calls this directly

Calls 1

randomsampleMethod · 0.45

Tested by

no test coverage detected