- changed status to open
'given' method with multiple arguments
Issue #18
closed
The "given" method, used for conditional probabilities and Bayesian reasoning, should be generalised to get multiple evidence conditions as arguments. This should be a handy alternative to ANDing conditions together. Example:
dice.given((4<=dice)&(dice<8))
could be replaced by
dice.given(4<=dice,dice<8)
This presents several advantages:
- The expression is simpler since parentheses can be removed.
- A set of conditions can be passed easily (with * prefix), which expresses more naturally a set of evidences.
- Performance can be improved greatly compared to ANDing evidences, providing the new "given" method uses short-circuit evaluation, i.e. exploration can be pruned as soon as a condition is evaluated to false.
The sole (minor) drawback is that an exception raised with an AND could not occur with the new technique, since some value combinations could be dropped due to short-circuit evaluation.
Comments (4)
-
reporter -
reporter - changed status to resolved
Ready for Lea 2.2.
-
reporter - changed title to 'given' method with multiple arguments
-
reporter - changed status to closed
- Log in to comment