Evidence context not taken into account for several methods

Issue #76 resolved
Pierre Denis repo owner created an issue

Evidence contexts allow defining conditions once for all, turning implicitly probabilities into conditional probabilities.

x = lea.vals(*"ABC")
y = lea.vals(*"ABC")
z = x + y
lea.add_evidence(x<y)
print (z)
# -> AB : 0.3333333333333333
#    AC : 0.3333333333333333
#    BC : 0.3333333333333333

However, such evidence contexts are not consistently taken into account for several Lea methods:

x.is_dependent_of(y)
# -> False
lea.mutual_information(x,y)
# -> 0.0
print (x.internal())
# -> Alea#2528739944368 <('A', 0.6666666666666666), ...>

Comments (5)

  1. Pierre Denis reporter

    Fix is_dependent_of and internal methods, change handling of evidence contexts so that Ilea instances created on the fly have directly the right condition (refs #76)

    → <<cset 60e3c348c016>>

  2. Pierre Denis reporter

    Fix is_dependent_of and internal methods, change handling of evidence contexts so that Ilea instances created on the fly have directly the right condition (refs #76)

    → <<cset 39b4d685e7d4>>

  3. Log in to comment