原书出处
Causal AI
The DiscreteFactor object can represent joint distributions as well. Listing 2.2 Modeling a joint distribution in pgmpy joint = DiscreteFactor( variables=['X', 'Y'], #1 cardinality=[3, 2], #2 values=[.25, .20, .20, .10, .15, .10], #3 state_names= { 'X': ['1', '2', '3'], #3 'Y': ['0', '1'] #3 } ) print(joint) #4 #1 Now we have two variables instead of one. #2 X has 3 outcomes, Y has 2.
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Causal AI/_epub-src/OEBPS/Text/chapter-2.xhtml
EPUB SHA-256:e55e7dc9d7966ea79311f2bc8d5bef7371a6dbb65240f11a2b3e44180b934e72