Figure 1: The compile tool button from the Network Window Tool Bar. |
You can also activate the compile function from Run Mode. Here, the Run Mode item of the Network Menu is replaced with the Recompile item.
When activating the compile function from Edit Mode, the current network is compiled and Run Mode is entered.
When activating the compile function from Run Mode, the current network is recompiled (this can sometimes be useful). If the color of the compile button changes, then this indicates that a recompilation of the network may be require in order to capture any changes made to the class of the network or to classes of instance nodes in the network. Notice that a compilation of a (limited-memory) influence diagram does not compute updated policies. To update policies it is necessary to perform a Single Policy Update after compiling the network.
The compilation of a Hugin network involves a transformation of the network to a junction tree in which the propagations can take place.
You can specify certain properties on the compilation in Hugin from the Network Properties item of the Network Menu. Figure 2 shows the Compilation tab of the Network Properties dialog box.
|
Figure 2: The Network Properties dialog box showing the Compilation tab. |
Generally, it is NP hard (mathematical way to say that it is impossible within reasonable time) to find the best internal representation of a Hugin network (the junction tree representation). This is basically because it is NP hard to triangulate a graph optimally.
In many cases, however, an optimal (or near-optimal) triangulation can in fact be found. From version 5.4 and onwards, The Hugin Decision Engine offers a method for optimal triangulation, which in many cases results in junction trees of much lower complexity than those generated using the other (heuristic) triangulation methods provided. The optimal triangulation method works by searching for minimal separators. For some networks this results in extremely many possible optimal separators.
Note on Optimal triangulation options:
|
The other triangulation methods listed in the Compilation tab are different heuristic methods, which in many cases perform quite well, but, as mentioned above, can result in junction trees that are far from optimal, complexity-wise. Which of the heuristics are the better one depends on the network at hand - so if your network is complex and seems to have poor performance with the current heuristic triangulation method, you might try one of the other heuristics or try the optimal triangulation method.
Finally, a triangulation can be loaded from file (i.e. load a node elimination order from file).
The save-to-memory operation stores a copy of the initial clique potentials in memory. This implies a faster initialization process which may improve efficiency of performing multiple propagations (e.g., as part of the Analysis Wizard).
You can sometimes save some space by using the optimization facilities. These are activated in the bottom half of the Compilation tab. You can choose between ordinary compression and compression involving approximation. The latter will cause less precision while the first will not.
If you select Approximate, you must also specify an epsilon value stating how much loss of precision you will allow. The larger the epsilon value, the less the precision (read more about this in the Approximate section).