hve with em works now.

This commit is contained in:
Vítor Santos Costa 2012-10-02 08:49:16 +01:00
parent c30e71fe68
commit 85e9da1332
2 changed files with 2 additions and 6 deletions

View File

@ -20,9 +20,9 @@ data(t,f,t,t).
%:- clpbn:set_clpbn_flag(em_solver,gibbs).
%:- 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,ve).
%:- clpbn:set_clpbn_flag(em_solver,ve).
timed_main :-
statistics(runtime, _),

View File

@ -125,7 +125,6 @@ setup_em_network(Items, Solver, state( AllDists, AllDistInstances, MargVars, Sol
run_examples(user:Exs, Keys, Factors, EList) :-
Exs = [_:_|_], !,
trace,
findall(ex(EKs, EFs, EEs), run_example(Exs, EKs, EFs, EEs),
VExs),
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) :-
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]) :-
pfl:skolem(K,D),
foldl(domain_to_number, D, Ns, 0, _).