Calculating the probability of evidence across equation nodes

The engine.
Post Reply
maghnie
Posts: 9
Joined: Fri May 03, 2024 10:45 am

Calculating the probability of evidence across equation nodes

Post by maghnie »

(This post is specifically about the Python wrapper of SMILE)

Can prob_evidence(...) be called on a network with equation nodes?

For reference, prob_evidence() works for me just fine on networks trained with BS (and CPT nodes).
However, after creating a network with PC (using the same training data), calling prob_evidence() causes my script to crash without any error messages.
Genie (academic version) also crashes when trying to get the Log Likelihood using the same data set and trained network, but I chalked it up to my many open tabs and programs.

On an unrelated note, this "silent crash" also happens if I try to call get_outcome_ids() on an equation node. But at least the incompatibility here between equation nodes and trying to get their "outcome ids" is expected and could be avoided.
shooltz[BayesFusion]
Site Admin
Posts: 1428
Joined: Mon Nov 26, 2007 5:51 pm

Re: Calculating the probability of evidence across equation nodes

Post by shooltz[BayesFusion] »

Thanks for the bug report, we will ensure the silent crashes do not occur (the program should generate a Python exception instead of crashing, of course).

Regarding P(e) for equation-based networks, I'll need to ask our theoretical division. Will post answer here once I know it.
marek [BayesFusion]
Site Admin
Posts: 435
Joined: Tue Dec 11, 2007 4:24 pm

Re: Calculating the probability of evidence across equation nodes

Post by marek [BayesFusion] »

Probability of any evidence in a continuous node will be zero, so you cannot do that even theoretically. I suggest that you discretize your network first and then calculate P(E). You can make the interval around the evidence as small as you want but not empty/zero length.
I hope this helps,

Marek
maghnie
Posts: 9
Joined: Fri May 03, 2024 10:45 am

Re: Calculating the probability of evidence across equation nodes

Post by maghnie »

Thanks for the replies and suggestion!

Chance nodes with small bins seems to be working great for now, but I will keep the discretization idea of equation nodes in mind for future reference.
Post Reply