def test_is_iequivalent(self):
     G = BayesianModel([("x", "y"), ("z", "y"), ("x", "z"), ("w", "y")])
     self.assertRaises(TypeError, G.is_iequivalent, MarkovModel())
     G1 = BayesianModel([("V", "W"), ("W", "X"), ("X", "Y"), ("Z", "Y")])
     G2 = BayesianModel([("W", "V"), ("X", "W"), ("X", "Y"), ("Z", "Y")])
     self.assertTrue(G1.is_iequivalent(G2))
     G3 = BayesianModel([("W", "V"), ("W", "X"), ("Y", "X"), ("Z", "Y")])
     self.assertFalse(G3.is_iequivalent(G2))
Example #2
0
 def test_is_iequivalent(self):
     G = BayesianModel([('x', 'y'), ('z', 'y'), ('x', 'z'), ('w', 'y')])
     self.assertRaises(TypeError, G.is_iequivalent, MarkovModel())
     G1 = BayesianModel([('V', 'W'), ('W', 'X'), ('X', 'Y'), ('Z', 'Y')])
     G2 = BayesianModel([('W', 'V'), ('X', 'W'), ('X', 'Y'), ('Z', 'Y')])
     self.assertTrue(G1.is_iequivalent(G2))
     G3 = BayesianModel([('W', 'V'), ('W', 'X'), ('Y', 'X'), ('Z', 'Y')])
     self.assertFalse(G3.is_iequivalent(G2))
 def test_is_iequivalent(self):
     G = BayesianModel([('x', 'y'), ('z', 'y'), ('x', 'z'), ('w', 'y')])
     self.assertRaises(TypeError, G.is_iequivalent, MarkovModel())
     G1 = BayesianModel([('V', 'W'), ('W', 'X'), ('X', 'Y'), ('Z', 'Y')])
     G2 = BayesianModel([('W', 'V'), ('X', 'W'), ('X', 'Y'), ('Z', 'Y')])
     self.assertTrue(G1.is_iequivalent(G2))
     G3 = BayesianModel([('W', 'V'), ('W', 'X'), ('Y', 'X'), ('Z', 'Y')])
     self.assertFalse(G3.is_iequivalent(G2))