def test_chow_liu1_F(self): bn = chow_liu(self.data) self.assertDictEqual( bn.F, { 0: {"cpt": [], "parents": [], "values": [1, 2]}, 1: {"cpt": [], "parents": [0], "values": [1, 2]}, 2: {"cpt": [], "parents": [0], "values": [1, 2]}, }, )
def test_chow_liu1_F(self): bn = chow_liu(self.data) self.assertDictEqual( bn.F, { 0: { 'cpt': [], 'parents': [], 'values': [1, 2] }, 1: { 'cpt': [], 'parents': [0], 'values': [1, 2] }, 2: { 'cpt': [], 'parents': [0], 'values': [1, 2] } })
def test_chow_liu1_E(self): bn = chow_liu(self.data) self.assertDictEqual(bn.E, {0: [1, 2], 1: [], 2: []})
def test_chow_liu1_V(self): bn = chow_liu(self.data) self.assertListEqual(bn.V, [0, 1, 2])