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

Method test_reducefactor

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

Source from the content-addressed store, hash-verified

152 self.assertEqual(self.factor.stride, d)
153
154 def test_reducefactor(self):
155 self.factor.reducefactor("Difficulty", 'easy')
156 a = [0.3, 0.4, 0.3, 0.9, 0.08, 0.02]
157 b = [3, 2]
158 c = ['Grade', 'Intelligence']
159 d = {'Grade': 1, 'Intelligence': 3}
160 self.assertEqual(self.factor.vals, a)
161 self.assertEqual(self.factor.card, b)
162 self.assertEqual(self.factor.scope, c)
163 self.assertEqual(self.factor.stride, d)
164
165 def test_copy(self):
166 copy = self.factor.copy()

Callers

nothing calls this directly

Calls 1

reducefactorMethod · 0.80

Tested by

no test coverage detected