new interface to display
This commit is contained in:
parent
7cbdad30f2
commit
22b17b5856
@ -73,7 +73,7 @@
|
|||||||
clpbn_bind_vals/3]).
|
clpbn_bind_vals/3]).
|
||||||
|
|
||||||
jt([[]],_,_) :- !.
|
jt([[]],_,_) :- !.
|
||||||
jt(LVs,Vs0,AllDiffs) :-
|
jt([LVs],Vs0,AllDiffs) :-
|
||||||
get_graph(Vs0, BayesNet, CPTs, Evidence),
|
get_graph(Vs0, BayesNet, CPTs, Evidence),
|
||||||
build_jt(BayesNet, CPTs, JTree),
|
build_jt(BayesNet, CPTs, JTree),
|
||||||
% JTree is a dgraph
|
% JTree is a dgraph
|
||||||
@ -83,7 +83,7 @@ jt(LVs,Vs0,AllDiffs) :-
|
|||||||
propagate_evidence(Evidence, NewTree, EvTree),
|
propagate_evidence(Evidence, NewTree, EvTree),
|
||||||
message_passing(EvTree, MTree),
|
message_passing(EvTree, MTree),
|
||||||
get_margins(MTree, LVs, LPs),
|
get_margins(MTree, LVs, LPs),
|
||||||
clpbn_bind_vals(LVs,LPs,AllDiffs).
|
clpbn_bind_vals([LVs],[LPs],AllDiffs).
|
||||||
|
|
||||||
|
|
||||||
get_graph(LVs, BayesNet, CPTs, Evidence) :-
|
get_graph(LVs, BayesNet, CPTs, Evidence) :-
|
||||||
|
@ -73,7 +73,7 @@ vel([LVs],Vs0,AllDiffs) :-
|
|||||||
% from array to list
|
% from array to list
|
||||||
list_from_CPT(Ps, LPs),
|
list_from_CPT(Ps, LPs),
|
||||||
% bind Probs back to variables so that they can be output.
|
% bind Probs back to variables so that they can be output.
|
||||||
clpbn_bind_vals(LVs,LPs,AllDiffs).
|
clpbn_bind_vals([LVs],[LPs],AllDiffs).
|
||||||
|
|
||||||
%
|
%
|
||||||
% just get a list of variables plus associated tables
|
% just get a list of variables plus associated tables
|
||||||
|
Reference in New Issue
Block a user