calc_kl_div: Calculate the Kullback-Leibler (KL) divergence of a posterior...

Description Usage Arguments Value

View source: R/multivariate_models.R

Description

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.

Usage

1
calc_kl_div(x_post_obj, th_x)

Arguments

x_post_obj

The result of a call to calc_x_posterior

th_w

The parameterization of the prior

Value

The Kullback-Leibler (KL) divergence


MichaelHoltonPrice/yada documentation built on Sept. 19, 2021, 11:27 p.m.