The probability of A given B, P(A | B), could be encoded as
&query(A | B) or &query(A,B).
This can be calculated by using P(A | B) = P(A and B) / P(B),
thus by first determining all stable models which contain A all all models which contain B and then summing up the corresponding probabilities.
Optionally queries could be conditional.
The probability of A given B, P(A | B), could be encoded as
&query(A | B)
or&query(A,B)
.This can be calculated by using P(A | B) = P(A and B) / P(B), thus by first determining all stable models which contain A all all models which contain B and then summing up the corresponding probabilities.