This function approximates from the learned distribution to the true distribution. This is not the full kld, it is the last term in Acid and de Campos (2003)'s paper on page 37. This function only approximates the kld, because the distributions are estimated by MLE. The reason to not use the true distribution is to get fast calculation by approximating the joint distributions from data.
1 |
data |
A categorical dataset. |
cptsLearned |
The estimated distribution of a learned BN. |
logBase |
The base of logarithm. Default is 2. |
smth |
A small value to get rid of 0 occurence. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.