Kullback–Leibler divergence

Function

context $p, q$ … probability distributions
definition todo: type
definition $D_{\mathrm{KL}}(P\|Q) = \int_{-\infty}^\infty p(x) \, \log \left( \dfrac{p(x)}{q(x)}\right) {\rm d}x$


Requirements

Cumulative distribution function, Natural logarithm of real numbers

Classical microcanonical entropy