we do not always want logarithms for CPTs.
This commit is contained in:
parent
365f454755
commit
1d4dc2b0d7
@ -10,6 +10,7 @@
|
|||||||
dist_new_table/2,
|
dist_new_table/2,
|
||||||
get_dist/4,
|
get_dist/4,
|
||||||
get_dist_matrix/5,
|
get_dist_matrix/5,
|
||||||
|
get_possibly_deterministic_dist_matrix/5,
|
||||||
get_dist_domain/2,
|
get_dist_domain/2,
|
||||||
get_dist_params/2,
|
get_dist_params/2,
|
||||||
get_dist_domain_size/2,
|
get_dist_domain_size/2,
|
||||||
@ -184,6 +185,11 @@ get_dist_matrix(Id, Parents, Type, Domain, Mat) :-
|
|||||||
matrix_new(floats, [DomainSize|Sizes], Tab, Mat),
|
matrix_new(floats, [DomainSize|Sizes], Tab, Mat),
|
||||||
matrix_to_logs(Mat).
|
matrix_to_logs(Mat).
|
||||||
|
|
||||||
|
get_possibly_deterministic_dist_matrix(Id, Parents, Type, Domain, Mat) :-
|
||||||
|
recorded(clpbn_dist_db, db(Id, _, Tab, Type, Domain, _, DomainSize), _),
|
||||||
|
get_dsizes(Parents, Sizes, []),
|
||||||
|
matrix_new(floats, [DomainSize|Sizes], Tab, Mat).
|
||||||
|
|
||||||
get_dsizes([], Sizes, Sizes).
|
get_dsizes([], Sizes, Sizes).
|
||||||
get_dsizes([P|Parents], [Sz|Sizes], Sizes0) :-
|
get_dsizes([P|Parents], [Sz|Sizes], Sizes0) :-
|
||||||
clpbn:get_atts(P,dist(Dist,_)),
|
clpbn:get_atts(P,dist(Dist,_)),
|
||||||
|
Reference in New Issue
Block a user