Description Usage Arguments Value References Examples
Kullback-Leibler Divergence Estimation
1 | KL_divergence(x, y, type = c("pdf", "cdf"), ...)
|
x |
values sampled from the distribution of interest |
y |
values sampled from the comparator distribution |
type |
using empirical p.d.f. or c.d.f. |
... |
options for density(...) if empirical p.d.f. applied |
value of KL divergence
Pérez-Cruz F. Kullback-Leibler divergence estimation of continuous distributions. In2008 IEEE international symposium on information theory 2008 Jul 6 (pp. 1666-1670). IEEE.
1 2 3 4 5 6 7 8 | library(divKL)
x <- rnorm(100, 1)
y <- rnorm(100, 3)
KL_divergence(x, y, "pdf")
KL_divergence(x, y, "cdf")
KL_divergence(y, x, "pdf")
KL_divergence(y, x, "cdf")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.