hve with em works now.
This commit is contained in:
parent
c30e71fe68
commit
85e9da1332
@ -20,9 +20,9 @@ data(t,f,t,t).
|
|||||||
|
|
||||||
%:- clpbn:set_clpbn_flag(em_solver,gibbs).
|
%:- clpbn:set_clpbn_flag(em_solver,gibbs).
|
||||||
%:- clpbn:set_clpbn_flag(em_solver,jt).
|
%:- clpbn:set_clpbn_flag(em_solver,jt).
|
||||||
%:- clpbn:set_clpbn_flag(em_solver,hve).
|
:- clpbn:set_clpbn_flag(em_solver,hve).
|
||||||
%:- clpbn:set_clpbn_flag(em_solver,bp).
|
%:- clpbn:set_clpbn_flag(em_solver,bp).
|
||||||
:- clpbn:set_clpbn_flag(em_solver,ve).
|
%:- clpbn:set_clpbn_flag(em_solver,ve).
|
||||||
|
|
||||||
timed_main :-
|
timed_main :-
|
||||||
statistics(runtime, _),
|
statistics(runtime, _),
|
||||||
|
@ -125,7 +125,6 @@ setup_em_network(Items, Solver, state( AllDists, AllDistInstances, MargVars, Sol
|
|||||||
|
|
||||||
run_examples(user:Exs, Keys, Factors, EList) :-
|
run_examples(user:Exs, Keys, Factors, EList) :-
|
||||||
Exs = [_:_|_], !,
|
Exs = [_:_|_], !,
|
||||||
trace,
|
|
||||||
findall(ex(EKs, EFs, EEs), run_example(Exs, EKs, EFs, EEs),
|
findall(ex(EKs, EFs, EEs), run_example(Exs, EKs, EFs, EEs),
|
||||||
VExs),
|
VExs),
|
||||||
foldl4(join_example, VExs, [], Keys, [], Factors, [], EList, 0, _).
|
foldl4(join_example, VExs, [], Keys, [], Factors, [], EList, 0, _).
|
||||||
@ -206,9 +205,6 @@ process_factor(Ev, f(bayes,Id,Ks), i(Id, Ks, Cases, NonEvs)) :-
|
|||||||
|
|
||||||
fetch_evidence(Ev, K, E, NonEvs, NonEvs) :-
|
fetch_evidence(Ev, K, E, NonEvs, NonEvs) :-
|
||||||
b_hash_lookup(K, E, Ev), !.
|
b_hash_lookup(K, E, Ev), !.
|
||||||
fetch_evidence(_Ev, _Id:K, Ns, NonEvs, [K|NonEvs]) :-
|
|
||||||
pfl:skolem(K,D), !,
|
|
||||||
foldl(domain_to_number, D, Ns, 0, _).
|
|
||||||
fetch_evidence(_Ev, K, Ns, NonEvs, [K|NonEvs]) :-
|
fetch_evidence(_Ev, K, Ns, NonEvs, [K|NonEvs]) :-
|
||||||
pfl:skolem(K,D),
|
pfl:skolem(K,D),
|
||||||
foldl(domain_to_number, D, Ns, 0, _).
|
foldl(domain_to_number, D, Ns, 0, _).
|
||||||
|
Reference in New Issue
Block a user