-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Hi guys
Hope you're well! I have a slightly niche problem. I'm keen to test out the technique for solving MMAP queries described in "Solving MMAP exactly by probabilistic circuit transformations" (Choi et al. 2022). The code for the experiments, and the mmap_solve() function are found on the marginal-map branch (https://github.com/Tractables/ProbabilisticCircuits.jl/tree/marginal-map, now a few years old). I've been testing it out, with an old version of ProbabilisticCircuits installed (v0.3.3), and keep getting a 'Node not defined' error. Here is a toy example:
Training a pc with strudel then trying mmap_solve on it:
`using ProbabilisticCircuits
using DataFrames
using LogicCircuits
using DiscriminativeCircuits
using DataConvenience
include("<path to queries/marginal_map.jl>")
train_x, valid_x, test_x = twenty_datasets("nltcs")
pc = learn_circuit(train_x; maxiter=100)
println(pc) # its definitely of type StructSumNode!
query = BitSet([1,2,3])
mmap_solve(pc, query, num_iter=1)`
We get a node not defined error!
Loading a pre-trained psdd instead and trying that:
pc = zoo_psdd("little_4var.psdd") mmap_solve(pc, query, num_iter=1)
same problem
It seems to be complaining about the pc objects I'm inputting, the function says it admits a StructSumNode input, and I'm sure the pc learned by learn_circuit() is of that format. The pre-loaded one is a PlainSumNode object, but I saw a similar circuit being loaded and inputted in the experiment code. What am I doing wrong here? Sorry that these are questions about an old version of this repo, but any help would be really appreciated!
Kind regards
Matthew