ML-KULeuven / problog

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

question: predicating on probability values #107

Closed alebarna closed 8 months ago

alebarna commented 10 months ago

Dear, I’m new to ProbLog and I’m currently “playing” with Bayesian Networks enconding. My question is as follows: once I get the probabilities computed for a certain atom (e.g. query(earthquake) results in a value of 0.98), is there a way to add clauses in the program that make use of them, e.g., if the probability of earthquake is greater than a certain value then this and that are true? This last form of reasoning would be purely classical, no need of probabilities and probabilistic engine, just pure Prolog would be enough. The issue I have is that I do not know how to re-call these probability values to write rules that have them as arguments, nor whether this is really possible. Thanks in advance! .aLessandro

rmanhaeve commented 10 months ago

This would classify as a sub-query, where you use the probability of an atom inside of the program itself. See this example for more info: https://dtai.cs.kuleuven.be/problog/tutorial/various/05_numberguessing.html

alebarna commented 10 months ago

thank you very much for your quick suggestion! I’ll work on that!