Improve performance on big BN

Issue #90 resolved
Pierre Denis repo owner created an issue

Lea's exact algorithm does not scale well on some BN.

Here is an example using alarm.bif (37 nodes, 46 arcs, 509 parameters)

declare_namespace(globals())
alarm_bn = read_bif_file("alarm.bif", create_vars=True)

The previous statements run very fast (BN creation, without much calculations). Now, the following query:

HR.given(PAP=="LOW").calc()

takes 3 minutes and consumes more than 10Gb in memory!

This can be improved dramatically by avoiding to expand generator into tuple when building the final probability distribution.

Comments (5)

  1. Pierre Denis reporter

    After the fix, the processing time is reduced to about 30 seconds, and the memory consumption is unnoticeable.

  2. Log in to comment