Skip to Content

Calculating Complexity: DL(B)

Description length of the Bayesian network — DL(B)

DL(B)\mathrm{DL}(B) is the number of bits required to represent a Bayesian network. We can break down this value into the sum of two components:

DL(G)\mathrm{DL}(G), which stands for the number of bits required to represent the graph GG of the Bayesian network,

DL(P∣G)\mathrm{DL}(P \mid G) represents the number of bits required to represent the set of probability tables PP.

DL(B)=DL(G)+DL(P∣G)\mathrm{DL}(B) = \mathrm{DL}(G) + \mathrm{DL}(P \mid G)

Calculating DL(G)

To calculate DL(G)\mathrm{DL}(G), we need to determine the number of nodes and the number of their parent nodes.

DL(G)=∑i=1n(log⁡2(n)+log⁡2(n∣Pai∣))\mathrm{DL}(G) = \sum_{i=1}^n \left( \log_2(n) + \log_2 \binom{n}{\lvert P_{a_i}\rvert} \right)

Here, nn is the number of nodes X1,…,XnX_1,\ldots,X_n. For node XiX_i, PaiP_{a_i} is its parent set in graph GG, and ∣Pai∣\lvert P_{a_i}\rvert is the number of parents.

Calculating DL(P|G)

The description length of the probability tables is proportional to the number of free probabilities. The factorization specifies the parent configurations for which each node needs a row. For node XiX_i with SiS_i states, each row has Si−1S_i-1 free probabilities because all SiS_i entries must sum to 1.

DL(P∣G)=∑i=1n(∏j=1∣Pai∣Sj×(Si−1)×DL(p))\mathrm{DL}(P \mid G) = \sum_{i=1}^n \left( \prod_{j=1}^{\lvert P_{a_i}\rvert} S_j \times (S_i - 1) \times \mathrm{DL}(p) \right)

Within the product for a given node, SjS_j is the number of states of its jjth parent. The product counts the possible parent configurations, with one probability-table row per configuration. When the node has no parents, the empty product is 1 and the table has one row.

BayesiaLab estimates the number of bits DL(p)\mathrm{DL}(p) for each free probability pp using the following heuristic, where NN is the number of observations.

DL(p)=log⁡2(N)2\mathrm{DL}(p) = \frac{\log_2(N)}{2}
Loading SVG...

For 16 observations, each free probability costs 2 bits. A binary child needs one free probability per parent configuration. Adding a binary parent gives the child two configurations, adding 2 table bits and 1 graph bit.