yay, my first commit
This commit is contained in:
18
packages/CLPBN/clpbn/bp/examples/allopstest.yap
Normal file
18
packages/CLPBN/clpbn/bp/examples/allopstest.yap
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
:- use_module(library(pfl)).
|
||||
|
||||
:- set_clpbn_flag(solver,fove).
|
||||
|
||||
|
||||
c(x1,y1,z1).
|
||||
c(x1,y1,z2).
|
||||
c(x2,y2,z1).
|
||||
c(x3,y2,z1).
|
||||
|
||||
bayes p(X)::[t,f] ; [0.2, 0.4] ; [c(X,_,_)].
|
||||
|
||||
bayes q(Y)::[t,f] ; [0.5, 0.6] ; [c(_,Y,_)].
|
||||
|
||||
bayes s(Z)::[t,f] , p(X) , q(Y) ; [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8] ; [c(X,Y,Z)].
|
||||
|
||||
% bayes series::[t,f] , attends(X) ; [0.5, 0.6, 0.7, 0.8] ; [c(X,_)].
|
78022
packages/CLPBN/clpbn/bp/examples/city_test.fg
Normal file
78022
packages/CLPBN/clpbn/bp/examples/city_test.fg
Normal file
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,8 @@ markov attends(P)::[t,f] , hot(W)::[t,f] ; [0.1, 0.2, 0.3, 0.4] ; [c(P,W)].
|
||||
|
||||
markov attends(P)::[t,f], series::[t,f] ; [0.5, 0.6, 0.7, 0.8] ; [c(P,_)].
|
||||
|
||||
:- clpbn_horus:set_horus_flag(use_logarithms,true).
|
||||
|
||||
?- series(X).
|
||||
|
||||
|
||||
|
20
packages/CLPBN/clpbn/bp/examples/fail.yap
Normal file
20
packages/CLPBN/clpbn/bp/examples/fail.yap
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
:- use_module(library(pfl)).
|
||||
|
||||
:- set_clpbn_flag(solver,ve).
|
||||
%:- set_clpbn_flag(solver,fove).
|
||||
|
||||
|
||||
t(ann).
|
||||
t(dave).
|
||||
|
||||
% p(ann,t).
|
||||
|
||||
bayes p(X)::[t,f] ; [0.1, 0.3] ; [t(X)].
|
||||
|
||||
% use standard Prolog queries: provide evidence first.
|
||||
|
||||
?- p(ann,t), p(ann,X).
|
||||
|
||||
% ?- p(ann,X).
|
||||
|
17
packages/CLPBN/clpbn/bp/examples/findleaks.yap
Normal file
17
packages/CLPBN/clpbn/bp/examples/findleaks.yap
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
:- use_module(library(pfl)).
|
||||
|
||||
:- set_clpbn_flag(solver,fove).
|
||||
|
||||
c1(x1).
|
||||
c1(x2).
|
||||
c1(x3).
|
||||
|
||||
c2(x2).
|
||||
c2(x3).
|
||||
c2(x4).
|
||||
|
||||
markov p::[t,f] ; [0.2, 0.4] ; [].
|
||||
markov q::[t,f] ; [0.2, 0.4] ; [].
|
||||
markov s::[t,f] , p::[t,f] ; [0.2, 0.4, 0.5, 0.1] ; [].
|
||||
|
32
packages/CLPBN/clpbn/bp/examples/workshop_attrs.yap
Normal file
32
packages/CLPBN/clpbn/bp/examples/workshop_attrs.yap
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
:- use_module(library(pfl)).
|
||||
|
||||
%:- set_clpbn_flag(solver,ve).
|
||||
%:- set_clpbn_flag(solver,bp), clpbn_bp:set_horus_flag(inf_alg,ve).
|
||||
:- set_clpbn_flag(solver,fove).
|
||||
|
||||
c(p1).
|
||||
c(p2).
|
||||
c(p3).
|
||||
c(p4).
|
||||
c(p5).
|
||||
|
||||
|
||||
markov attends(P)::[t,f] , attr1::[t,f] ; [0.1, 0.2, 0.3, 0.4] ; [c(P)].
|
||||
|
||||
markov attends(P)::[t,f] , attr2::[t,f] ; [0.1, 0.2, 0.3, 0.4] ; [c(P)].
|
||||
|
||||
markov attends(P)::[t,f] , attr3::[t,f] ; [0.1, 0.2, 0.3, 0.4] ; [c(P)].
|
||||
|
||||
markov attends(P)::[t,f] , attr4::[t,f] ; [0.1, 0.2, 0.3, 0.4] ; [c(P)].
|
||||
|
||||
markov attends(P)::[t,f] , attr5::[t,f] ; [0.1, 0.2, 0.3, 0.4] ; [c(P)].
|
||||
|
||||
markov attends(P)::[t,f] , attr6::[t,f] ; [0.1, 0.2, 0.3, 0.4] ; [c(P)].
|
||||
|
||||
markov attends(P)::[t,f], series::[t,f] ; [0.5, 0.6, 0.7, 0.8] ; [c(P)].
|
||||
|
||||
%:- clpbn_horus:set_horus_flag(use_logarithms,true).
|
||||
|
||||
?- series(X).
|
||||
|
Reference in New Issue
Block a user