Exact Inference
Context
By default, BayesiaLab constructs a Junction Tree from the given Bayesian network to perform Exact Inference. BayesiaLab constructs a Junction Tree as you switch from Modeling Mode to Validation Mode for a given Bayesian network model for the first time. Constructing such a Junction Tree can be very time- and memory-consuming depending on the network size and complexity. However, once the Junction Tree is constructed, performing inference is very quick. Whenever you modify your network (structure or parameters), BayesiaLab needs to recreate the entire Junction Tree again.
Usage
You can specify to use Exact Inference by selecting Menus > Inference > Exact Inference.

By default, Exact Inference is active whenever you build or learn a new Bayesian network. In certain cases, the memory requirements or the expected computing time for creating the Junction Tree can be prohibitive. If you switch from Modeling Mode to Validation Mode in such a situation, BayesiaLab may display a warning and offer you several options depending on the severity of the situation:
| Condition | Exact Inference will be very time-consuming | Exact Inference will not be possible |
|---|---|---|
| Options | ![]() | ![]() |
| Continue with Exact Inference |
| n/a |
| Use the Automatic Structural Complexity Reducer |
| |
| Go back to Modeling Mode |
| n/a |
| Switch to Approximate Inference |
| |
Bear in mind that most of BayesiaLab’s analysis tools and functions require Exact Inference. They will not work with Approximate Inference.

