示例#1
0
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)
示例#2
0
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)
示例#3
0
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)
示例#4
0
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)
示例#5
0
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)
    
示例#6
0
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)
示例#7
0
文件: prod.py 项目: HunterAllman/kod
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)




示例#8
0
文件: prod.py 项目: EJHortala/books-2
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)