def showBayesNet(theBayesNet):
global TK_ROOT, SP_CANVAS
TK_ROOT = Tk(className=TITLE) # Create window
TK_ROOT.grid_rowconfigure(0, weight=1)
TK_ROOT.grid_columnconfigure(0, weight=1)
SP_CANVAS = Canvas(TK_ROOT, width=1100, height=500, xscrollcommand=None,
yscrollcommand=None)
SP_CANVAS.grid(row=0,column=0,sticky='nesw')
headingFont = tkFont.Font(family="Helvetica", size=18)
SP_CANVAS.create_text(350, 50, font=headingFont,
text='Bayes Net with Probability Updating using Conditional Probability Values')
for node in theBayesNet.nodes:
display_parent_links(node)
for node in theBayesNet.nodes:
display_node(node)
createMenu(TK_ROOT)
TK_ROOT.mainloop()
评论列表
文章目录