def test_lect05_marginalise(self): from gPy.Demos import _marginalise_gui cancer = CompactFactor(read_csv(open('cancer.dat'))) data = cancer['Smoker', 'Cancer', 'Bronchitis'] root = Tk() _marginalise_gui(data, root) root.after(delay, kill, root) root.mainloop()
def test_lect05_marginalise2(self): from gPy.Demos import _marginalise_gui clear_default_domain() asia = BN() asia.from_dnet(read_dnet('Asia_lower.dnet')) factor = asia['Smoking'] * asia['Cancer'] * asia['Bronchitis'] root = Tk() _marginalise_gui(factor, root) root.after(delay, kill, root) root.mainloop()