Parser accepts Bernoulli distributions for ill-defined probabilities

Issue #68 resolved
geisserf created an issue

Even in debug mode the parser accepts a Bernoulli distribution for truth values outside of [0,1]. This can lead to ill-defined probability distributions, such as

 Value Probability
 0  3
 1 -2

Unfortunately the isWellDefined method of probability_distribution.cc does also not check if the individual probabilities are < 0 and instead only checks if the sum is equal to 1 (which is valid for individual probabilites 3 and -2.

I'll extend the isWellDefined check and add an assertion to assignBernoulli such that running the parser in debug mode detects this ill-defined domain description.

Comments (4)

  1. Log in to comment