Efficiently calculating many inferences at once #1479
Unanswered
nathanielvirgo
asked this question in
Q&A
Replies: 1 comment
-
From looking through the source, it seems that calls to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm just trying out this library for the first time, so please forgive any lack of knowledge I have.
I have a Bayesian network, and I'd like to do the following inference.
In fact each of the subsets in the second step consists of a node and its parents, so presumably they're each represented by a factor in the underlying factor graph representation.
From what I understood so far from the source and documentation, there seems to be no way to do this "all in one go". If I call
query
withjoint=False
then it will give me marginals for each node individually, but I don't think it can tell me how each node is co-distributed with its parents. So it seems that I have to callquery
several times withjoint=True
in order to get the results I want. (I don't want to just call it once withjoint=True
because the number of variables might get quite big and I don't need the whole joint distribution.)My questions are:
Is this correct, or can I extract the data I'm looking for some other way?
If I have to call
query
multiple times in this way, is that efficient? My guess would be that this would perform belief propagation multiple times unnecessarily, but I'm unsure because it's not currently clear to me what thecalibrate
method is doing, and the results from that seem to be cached between calls toquery
.If what I'm asking for isn't currently possible, would it make sense to submit a feature request, and if so, how likely is it to be implemented?
Beta Was this translation helpful? Give feedback.
All reactions