原书出处
Causal AI
Unfortunately, we can’t leave the impossible values blank when we specify a Tabular-CPD, so in the following code, we’ll need to assign arbitrary values to these elements. Listing 6.5 Implementation of Player Second Choice assignment function in pgmpy from pgmpy.factors.discrete.CPD import TabularCPD f_second_choice = TabularCPD( variable='Player Second Choice', variable_card=3, values=[ [1,0,0,1,0,0,1,0,0,0,0,0,0,0,1,0,1,0], #1 [0,1,0,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1], #1 [0,0,1,0,0,1,0,0,1,0,1,0,1,0,0,0,0,0] #1 ], evidence=[ 'Strategy', 'Host Door Selection', 'Player First Choice'
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Causal AI/_epub-src/OEBPS/Text/chapter-6.xhtml
EPUB SHA-256:e55e7dc9d7966ea79311f2bc8d5bef7371a6dbb65240f11a2b3e44180b934e72