View source: R/kld-analytical.R
kld_exponential | R Documentation |
This function computes D_{KL}(p||q)
, where p\sim \text{Exp}(\lambda_1)
and q\sim \text{Exp}(\lambda_2)
, in rate parametrization.
kld_exponential(lambda1, lambda2)
lambda1 |
A scalar (rate parameter of true exponential distribution) |
lambda2 |
A scalar (rate parameter of approximate exponential distribution) |
A scalar (the Kullback-Leibler divergence)
kld_exponential(lambda1 = 1, lambda2 = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.