This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/CLPBN/examples/complex.pfl

80 lines
1.5 KiB
Plaintext
Raw Normal View History

:- use_module(library(pfl)).
%:- set_solver(ve).
%:- set_solver(hve).
%:- set_solver(jt).
%:- set_solver(bdd).
%:- set_solver(bp).
%:- set_solver(cbp).
%:- set_solver(gibbs).
%:- set_solver(lve).
%:- set_solver(lkc).
%:- set_solver(lbp).
/*
v01 v02
\ /
\ /
\ /
v03 v04 v05
/ \ | / \
/ \ | / \
/ \ | / \
v06 v07 v08
| |
| |
| |
v09 v10
*/
markov v01::[a,b] ; table1 ; [].
markov v02::[a,b,c] ; table2 ; [].
markov v03::[a,b], v01, v02 ; table3 ; [].
markov v04::[a,b,c] ; table4 ; [].
markov v05::[a,b,c] ; table5 ; [].
markov v06::[a,b,c,d], v03 ; table6 ; [].
markov v07::[a,b], v03, v04, v05 ; table7 ; [].
markov v08::[a,b], v05 ; table8 ; [].
markov v09::[a,b], v06 ; table9 ; [].
markov v10::[a,b], v07 ; table10 ; [].
table1([ 0.74, 0.14 ]).
table2([ 0.032, 0.028, 0.24 ]).
table3([
0.15, 0.44, 1.29, 2.21, 0.5, 0.36,
0.55, 0.14, 3.29, 5.71, 1.75, 1.56
]).
table4([ 0.1, 0.58, 0.74 ]).
table5([ 3.2, 0.28, 1.24 ]).
table6([ 0.11, 0.41, 0.59, 2.11, 0.15, 1.06, 0.124, 0.929 ]).
table7([
0.11, 0.14, 0.29, 0.1, 0.23, 0.42, 0.11, 0.32, 0.14,
0.41, 0.54, 0.15, 1.21, 0.65, 0.67, 0.8, 0.99, 0.45,
1.11, 0.24, 1.29, 0.17, 0.24, 0.124, 0.41, 0.12, 0.55,
0.12, 1.4, 1.24, 1.1, 0.05, 0.078, 0.71, 0.69, 0.1
]).
table8([ 0.19, 0.49, 2.1, 3.1, 1.5, 2.8 ]).
table9([ 0.61, 1.4, 0.09, 1.4, 0.61, 0.24, 0.19, 0.6 ]).
table10([ 1.02, 0.88, 0.87, 0.45 ]).