Compile

The compile function is activated from Edit Mode either by pressing the compile tool button (see Figure 1) or by selecting the Run  item of the Network Menu.

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).

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.  To control the running time of the search for an optimal triangulation, the maximum number of minimal separators to generate can be specified in the text field following the "Optimal triangulation" radio button. If this value is set to zero, an unlimited number of separator are allowed to be generated.

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.

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).


Back