Author Topic: Hugin ran out of memory. What can I do ?  (Read 14037 times)

Offline Anders L Madsen

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 2295
    • View Profile
Hugin ran out of memory. What can I do ?
« on: January 26, 2007, 13:49:10 »
The size of Bayesian networks can grow exponentially in the number of nodes. In particular, the size of the CPTs grow exponentially in the number of parents. So if you have, e.g., a node C, with parents P1, P2, P3, P4, P5, P6, P7 and each node has 10 states, the size of Cs CPT will be 10^8 numbers = 100.000.000 number. So the CPTs can grow very big. Furthermore, each number takes up 8 bytes of memory, thus the CPT will need 800Mb of memory for a network with only 8 nodes. Another cause for memory usage is the creation of the junction trees (which occurs during compilation). Depending on the structure of the network, the cliques in the junction tree can grow very large as well, if either a lot of nodes, or the nodes with the largest CPTs, end up in the same clique.
  • Install more memory.
  • Examine the CPTs and reduce the largest ones, either by removing parents, or by removing states from either the parents or the node itself.
  • Change the structure of the network, if the error occurs during compilation, to change the constructed cliques. An alternative to this, is to change the triangulation method, as this will often result in a different junction tree (Network properties -> compilation -> triangulation method).
HUGIN EXPERT A/S