kld_uniform_gaussian {kldest} | R Documentation |
Analytical KL divergence between a uniform and a Gaussian distribution
Description
This function computes D_{KL}(p||q)
, where p\sim \text{U}(a,b)
and q\sim \mathcal{N}(\mu,\sigma^2)
.
Usage
kld_uniform_gaussian(a = 0, b = 1, mu = 0, sigma2 = 1)
Arguments
a , b |
Parameters of uniform (true) distribution |
mu , sigma2 |
Parameters of Gaussian (approximate) distribution |
Value
A scalar (the Kullback-Leibler divergence)
Examples
kld_uniform_gaussian(a = 0, b = 1, mu = 0, sigma2 = 1)
[Package kldest version 1.0.0 Index]