View source: R/kld-analytical.R
kld_uniform | R Documentation |
This function computes D_{KL}(p||q)
, where p\sim \text{U}(a_1,b_1)
and q\sim \text{U}(a_2,b_2)
, with a_2<a_1<b_1<b_2
.
kld_uniform(a1, b1, a2, b2)
a1 , b1 |
Range of true uniform distribution |
a2 , b2 |
Range of approximate uniform distribution |
A scalar (the Kullback-Leibler divergence)
kld_uniform(a1 = 0, b1 = 1, a2 = 0, b2 = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.