def factor_mult(): """Demo showing two univariate factors being multiplied""" from gPy.Demos import prod_gui cancer = asia['Smoking'] * asia['Cancer'] cancer = cancer.sumout(['Smoking']) visit = asia['VisitAsia'] * 1 prod_gui(visit,cancer)
def prod_demo(): """Demo of factor multiplication of univariate factors""" from Demos import prod_gui cancer = asia['Smoking'] * asia['Cancer'] cancer = cancer.sumout(['Smoking']) visit = asia['VisitAsia'] * 1 prod_gui(visit,cancer)
def prod_gen(): """Demo of general factor multiplication""" from Demos import prod_gui f1 = asia['Bronchitis'] * asia['Cancer'] f2 = asia['Bronchitis'] * 1 f3 = asia['Bronchitis'] * asia['Dyspnea'] f4 = asia['TbOrCa'] * 1 prod_gui(f1,f2) prod_gui(f1,f3) prod_gui(f1,f4)
def prod_gen(): """Demo showing factors being multiplied""" from gPy.Demos import prod_gui f1 = asia['Bronchitis'] * asia['Cancer'] f2 = asia['Bronchitis'] * 1 f3 = asia['Bronchitis'] * asia['Dyspnea'] f4 = asia['TbOrCa'] * 1 prod_gui(f1,f2) prod_gui(f1,f3) prod_gui(f1,f4)
from gPy.Examples import asia from gPy.Demos import prod_gui f1 = asia['Bronchitis'] * asia['Cancer'] f2 = asia['Bronchitis'] * 1 f3 = asia['Bronchitis'] * asia['Dyspnea'] f4 = asia['TbOrCa'] * 1 prod_gui(f1,f2) prod_gui(f1,f3) prod_gui(f1,f4)
from gPy.Examples import asia from gPy.Demos import prod_gui f1 = asia['Bronchitis'] * asia['Cancer'] f2 = asia['Bronchitis'] * 1 f3 = asia['Bronchitis'] * asia['Dyspnea'] f4 = asia['TbOrCa'] * 1 prod_gui(f1, f2) prod_gui(f1, f3) prod_gui(f1, f4)
from gPy.IO import read_dnet from gPy.Models import BNM from gPy.Demos import prod_gui asia = BNM() asia.from_dnet(read_dnet(open('Asia_lower.dnet'))) cancer = asia['Smoking'] * asia['Cancer'] cancer = cancer.sumout(['Smoking']) visit = asia['VisitAsia'] * 1 prod_gui(visit,cancer)
from gPy.IO import read_dnet from gPy.Models import BNM from gPy.Demos import prod_gui asia = BNM() asia.from_dnet(read_dnet(open('Asia_lower.dnet'))) cancer = asia['Smoking'] * asia['Cancer'] cancer = cancer.sumout(['Smoking']) visit = asia['VisitAsia'] * 1 prod_gui(visit, cancer)