-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with evidence #94
Comments
I find it a bit hard to give it an easy explanation, as the program seems a bit unintuitive to me. |
Thank you for the explanation! It makes sense that it is unintuitive to you, the code is the result of simplifying a longer program. My intuitive understanding is that:
Hence, I would expect the result to be the same for both types of evidence. Does this make sense to you? Now, I managed to fixed the issue just by rewriting the rule |
Hmm, I don't think the re-ordering should affect the probabilities like that. We'll have to investigate further whether this isn't a bug. |
TL;DR: you should be using r(X,Y) first if you want the behaviour to be identical. There is a semantical difference between placing the r(X,Y) first or last in the body of a rule. This has to do with Prolog's semantics of negation, and is not specific to ProbLog. I will first use a Prolog example to explain the behaviour. You can test this in SWI-Prolog (they have an online/browser editor).
The meaning of negation is that it is true if it is impossible to achieve the goal within (link 1, link 2). When querying When querying Ground programsThis behaviour can also be seen in the relevant ground programs. The relevant ground program for
is
which shows that
When instead using
which shows there are 4 causes for c (node 9, disjunction over 5, 6, 7, 8):
The rule Then why did c(X) :- .. rule not have this issue?Because X is already in the head ( |
Thank you very much for the long and clear explanation! |
Hello,
I do not understand the behavior of evidence in the following example.
Could you please help me with it, or point to somewhere where I could look for the answer?
Here come the system versions and the files:
The result is the same with both types of evidence:
But if I add
more.lp
then the results differ, why is this?Thank you!
The text was updated successfully, but these errors were encountered: