kld_exponential {kldest} | R Documentation |
Analytical KL divergence for two univariate exponential distributions
Description
This function computes D_{KL}(p||q)
, where p\sim \text{Exp}(\lambda_1)
and q\sim \text{Exp}(\lambda_2)
, in rate parametrization.
Usage
kld_exponential(lambda1, lambda2)
Arguments
lambda1 |
A scalar (rate parameter of true exponential distribution) |
lambda2 |
A scalar (rate parameter of approximate exponential distribution) |
Value
A scalar (the Kullback-Leibler divergence)
Examples
kld_exponential(lambda1 = 1, lambda2 = 2)
[Package kldest version 1.0.0 Index]