#| A Bayes-net has the form ( ... ) Each element of the list has the form ( ... ) A cpt-row has the form ( ... ) if the list of parents is empty, or ( cond-prob-of-val-1 ... cond-prob-of-val-n), if the list of parents is non-empty. n is the number of values the corresponding variable can take on. has the form ( ... ) where m is the number of parents and each is a possible value of the jth parent. Each cpt is essentially a table with N rows labelled by the combination of parent values and columns corresponding to values of the given variable. The ordering of the columns corresponds to the ordering of the values in the given . |# (setf *test-net* '((Cause (true false) ; can take on values true/false () ; has no parents (0.5 0.5)) ; P(Cause = true) = P(Cause = false) = 0.5 (Effect1 (true false) (Cause) ; has Cause as its only parent ((true) 0.8 0.2) ; these 4 numbers represent the CPT ((false) 0.7 0.3)) ; (note that each row adds up to 1) (Effect2 (true false) (Cause) ((true) 0.4 0.6) ; this row is P(Effect2 | Cause = true) ((false) 0.5 0.5)) ; this row is P(Effect2 | Cause = false) ))