ProbabilisticCircuits.jl
ProbabilisticCircuits.jl copied to clipboard
Easier public apis for Conditional statments + Marginalization mask
- Easy CON API Currently user has to manually call MAR twice to get conditionals. Have some api like this:
conditional(circuit::ProbCircuit, data::DataFrame, q_indices)
Where q_indice
s give indexes of variables in q
for each datapoint (all variables mentioned in q[i]
should NOT be missing in the correspoding data[i]
). In the end we are computing p( q | x^o)
for each data point where x^o
is all observed variables except the ones in q
.
- MAR with Marginalization mask
Makes sense to add another API to marginalize even over observed varibles. (for example above we need
p^o
butx^o, q
is observed). This helps to avoid copying data for each query.
initial attempt here: https://github.com/Juice-jl/ProbabilisticCircuits.jl/compare/master...cond