ML-KULeuven / problog

ProbLog is a Probabilistic Logic Programming Language for logic programs with probabilities.
https://dtai.cs.kuleuven.be/problog/
298 stars 34 forks source link

Not throwing an error with inconsistent theories? #58

Closed pclark425 closed 3 years ago

pclark425 commented 3 years ago

Hi - we've been using ProbLog, and generally it (understandably) seems to throw an error for inconsistent theories. However, for the below (apparently) inconsistent theory it happily provides an answer (prob 0 for the query):

https://dtai.cs.kuleuven.be/problog/editor.html#task=prob&hash=5c4dbb643838e9f82416f278a4fbd352 1.0::green(bear). 1.0::+round(bear). 1.0::round(X) :- green(X). query(round(bear)).

Is this surprising? Am I misunderstanding the semantics here?

Thanks! Peter Clark (peterc@allenai.org)

rmanhaeve commented 3 years ago

Hi Peter

This does not seem to be an inconsistent theory, and the calculated probability is correct w.r.t. the semantics of inhibition effects (https://lirias.kuleuven.be/retrieve/286342). Namely, if we take p_green as the probability of green(bear), and p_inhib to be the probability of the second line, than we expect p(round(bear)) = p_green (1 - p_inhib).

In this example: https://dtai.cs.kuleuven.be/problog/editor.html#task=prob&hash=76a3b7fd5aef690079cc765b69fc4bb8 we expect p(round(bear)) = 0.5 * (1 - 0.25) = 0.375, which is also the probability we get.

I am going to close this issue for now as it doesn't seem to be a bug, but feel free to contact me on my e-mail address (linked in my profile) for further questions.

Kind regards, Robin

pclark425 commented 3 years ago

Robin – Thanks so much, that’s super helpful!!! I really appreciate the pointer to the appropriate semantics! Best wishes, Pete

From: rmanhaeve @.> Sent: Tuesday, March 23, 2021 1:35 AM To: ML-KULeuven/problog @.> Cc: Peter Clark @.>; Author @.> Subject: Re: [ML-KULeuven/problog] Not throwing an error with inconsistent theories? (#58)

Hi Peter

This does not seem to be an inconsistent theory, and the calculated probability is correct w.r.t. the semantics of inhibition effects ( https://lirias.kuleuven.be/retrieve/286342). Namely, if we take p_green as the probability of green(bear), and p_inhib to be the probability of the second line, than we expect p(round(bear)) = p_green (1 - p_inhib).

In this example: https://dtai.cs.kuleuven.be/problog/editor.html#task=prob&hash=76a3b7fd5aef690079cc765b69fc4bb8 we expect p(round(bear)) = 0.5 * (1 - 0.25) = 0.375, which is also the probability we get.

I am going to close this issue for now as it doesn't seem to be a bug, but feel free to contact me on my e-mail address (linked in my profile) for further questions.

Kind regards, Robin

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ML-KULeuven/problog/issues/58#issuecomment-804719209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3QZP3EYW75CQ3KGOOMEFDTFBHENANCNFSM4ZTYISGQ .