-
Notifications
You must be signed in to change notification settings - Fork 35
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
InconsistentEvidenceError for evidence with non-beta distributions + support for "nonbinary evidence"? (dcproblog_develop) #39
Comments
Post holiday bump, happy 2020 y'all! |
Happy 2020 to you too! Pedro is working on the DC branch but I can tell you the source of your error. I believe you are wrongly using the is/2 in
(https://dtai.cs.kuleuven.be/problog/editor.html#task=prob&hash=43fd0d22606963fae76dd22f8088f9fe) (@pedrozudo) Your second question on support for evidence that is non-binary can best be answered by @pedrozudo . |
Is it something like this you want?
Using the other distribution if some condition is satisfied. |
Hey @VincentDerk thanks for getting back so soon.
Understood, in this case what I was looking for is c to be the number representing the probability: P(b>1) So in that case, the question is if there is some syntax to assign to c the numerical value for P(b>1):
Regarding the example you give, it is similar to the 2nd code snippet I shared in the original question, and is structurally different from the situation above. |
To obtain the probability within the program you need to use subquery/2 (or subquery/3 if you want to give evidence). Here the probability of event(N) is set to the probability that b > 1:
To obtain a conditional probability you can use subquery/3 like in this or this example. |
Thanks for clarifying @VincentDerk And yeah it looks like using subquery leads to the following issue: "AttributeError: 'LogicFormula' object has no attribute 'get_density_name'" I'll wait for this issue to be resolved before proceeding: #40 You guys have built a really interesting framework for bringing in domain knowledge into probabilistic programming in a principled / declarative way. There are so many applications of this I can see :) |
Hi Shuvro, About your question to condition on continuous random variables. I guess you are looking for something along the lines in this examples: I introduced a new predicate 'observation/2' (instead of 'evidence/2') to differentiate the conditioning on Boolean random variables and continuous random variables (semantically it is not the same). Let me know if this does the trick. |
Hi @pedrozudo thanks for your response. I believe this example does not address the issue. It is similar to the 2nd example in the original question, which works (i.e. we're using a beta distribution to model the prior probability of something). The simplest way of describing what I'm looking for maybe with an example:
This is a minimal example, but in general this ability combined with everything else you guys have should be extremely powerful for many data driven applications. |
@pedrozudo just to confirm, I believe @VincentDerk has correctly identified the underlying issue and opened a separate thread for it here: #40 - let me know if there is any I can help here |
Hey guys,
Playing around with the dcproblog_develop branch of this repo / continuous variables. The following snippet leads to an 'InconsistentEvidenceError'.
The idea here is to update the parameters of b (a normal distribution) based on observations or evidence of an event which is tied to b being greater than 1 - not sure if this is supported or I am using the wrong syntax (i.e. I would imagine b & c are different types above)?
I see the following example in the repo which is similar (with the idea being: use a beta distribution which has the characteristic that it's domain is from 0 to 1, to model the probability of an outcome / can we adapt this such that 'B' is coming from functions of other probability distributions?):
Further, do you guys anticipate supporting evidence that is non-binary, i.e. something along the lines of:
^ I know plenty of other probabilistic programming frameworks are out there for this, but would be amazing to have this ability tied in with all the logical aspects of problog / hal_problog, unifying standard probabilistic programming with everything you guys have atm.
Thanks,
Shuvro
The text was updated successfully, but these errors were encountered: