Parameter Estimation
Now we can see the real benefit of bringing all variables as nodes into BayesiaLab. To calculate Mutual Information, all the terms of the equation can be easily computed with BayesiaLab once we have a fully specified network.
We start with a pair of nodes, namely and . As opposed to , which is a discretized Continuous variable, is categorical, and, as such, it has been automatically treated as Discrete in BayesiaLab. This is the reason the node corresponding to has a solid border. We now add an arc between these two nodes to explicitly represent the dependency between them:
In BayesiaLab 11.9.1, adding this arc retains the existing marginal probabilities in each new CPT row. These repeated values do not yet describe the dependency in the data. We must estimate the Conditional Probability Table (CPT) of given . In Chapter 4, we supplied CPTs from existing knowledge. Here, the associated database supplies the observations. The table below shows its first 10 records, including the missing Neighborhood values.
Counting all records gives the observed marginal counts of . Of the 2,930 records, 443 have a missing Neighborhood value; they are shown separately below.
Because is the parent of , we need the distribution of price states within each neighborhood. A cross-tabulation counts the known pairs. With Structural EM selected, BayesiaLab also estimates contributions from records with missing Neighborhood values. The completed occurrence table below therefore contains fractional counts, rather than only complete-case integer counts.
For complete data, normalizing each row of a count table illustrates how a CPT is obtained. Here, the following table reproduces the probabilities actually returned by BayesiaLab’s estimator with Structural EM. Tiny nonzero estimates are retained, and displayed rounding can affect row totals. Together, the network structure and the CPTs comprise the Bayesian network.
In practice, however, we do not need to bother with these individual steps. Rather, BayesiaLab can automatically learn all marginal and conditional probabilities from the associated database. We select Menus > Learning > Parameter Estimation to perform this task.
After Parameter Estimation, double-click to open the Node Editor. Under Probability Distribution > Tabular, verify the 27 rows and five columns. These probabilities match the table above, up to the displayed rounding.
This model now provides the basis for computing the Mutual Information between and . BayesiaLab computes Mutual Information on demand and can display its value in numerous ways. For instance, in Validation Mode F5, we can select Menus > Analysis > Visual > Overall > Arc > Mutual Information.
The value of Mutual Information is now represented graphically in the thickness of the arc. This does not give us much insight because we only have a single arc in this network. So, we click the Show Arc Comments icon in the Toolbar to show the numerical values.
In the current display, the blue number is relative Mutual Information for the child, , and the red number is relative Mutual Information for the parent, . The Relationship Analysis report gives the absolute Mutual Information: 0.6462 bits. Mutual Information is symmetric, so the absolute amount is the same in both directions; the relative percentages differ because the nodes have different entropies.
The blue value divides Mutual Information by the marginal entropy of the child, :
The red value divides the same Mutual Information by the marginal entropy of the parent, :
Knowing therefore reduces uncertainty about by about 34.93% on average. Knowing reduces uncertainty about by about 15.16%. These are the two directional Relative Mutual Information values. They should not be confused with the report’s Symmetric Normalized Mutual Information (18.2629%) or Symmetric Relative Mutual Information (23.0123%).
To compare predictors, we next compute their relationships with in a network containing all 49 variables.