Expected Log-Loss
Context
The Log-Loss reflects the number of bits required to encode an -dimensional piece of evidence (or observation) given the current Bayesian network . As a shorthand for “the number of bits required to encode,” we use the term “cost” in the sense that “more bits required” means computationally “more expensive.”
where is the joint probability of the evidence computed by the network :
Furthermore, one of the key metrics in Information Theory is Entropy:
As a result, Entropy can be considered the sum of the Expected Log-Loss values of each state of variable given network .
where
Usage
To illustrate these concepts, we use the familiar Visit Asia network:
In BayesiaLab, the Expected Log-Loss values can be shown in the context of the Monitors.
Monitors
We consider the nodes and in the VisitAsia.xbl network.
- On the left, the Monitors of the two nodes show their marginal distributions.
- On the right, we set , which updates the probability of , i.e., .
- On the Monitor of , we now select Monitor Contextual Menu > Show Expected Log-Loss so that the Expected Log-Loss values for the states of are shown instead of their probabilities.
- Setting reduces the entropy of . The contribution from decreases, while the contribution from changes only slightly.
Illustration
The following plot illustrates , , and . For a compact representation in the plot, we substituted for .
In this binary case, the curves show how can be decomposed into and .
The blue curve shows the contribution from . Its probability falls from 57.48% to 19.46%. Both Monitor values display as 0.459 bits. Calculating with the displayed probabilities gives about 0.4592 and 0.4595 bits, respectively.
The red curve shows the contribution from . Its probability rises from 42.52% to 80.54%, and its contribution falls from about 0.525 to 0.251 bits.
Monitor tooltip
Instead of replacing the states’ probabilities with the Expected Log-Loss values in a Monitor, you can bring up the Expected Log-Loss values ad hoc as a Tooltip.
- Click on the Information Mode icon in the Toolbar.
- Then, when you hover over any Monitor with your cursor, a Tooltip shows the Expected Log-Loss values.