Description Usage Arguments Value
View source: R/multivariate_models.R
The inputs are an output from calc_x_posterior
, x_post_obj, and a
parameterization of the prior, th_x (see calc_x_density
. The output
is the divergence of the posterior density from the prior density, which is
a measure of the information gained from the update step. The divergence is
calculated using a base 2 logarithm, so the units of the output are bits.
Any points for which the prior or posterior density is undefined,
non-finite, or zero are ignored.
1 | calc_kl_div(x_post_obj, th_x)
|
x_post_obj |
The result of a call to calc_x_posterior |
th_w |
The parameterization of the prior |
The Kullback-Leibler (KL) divergence
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.