f-divergence (source code)

= f-divergence
{c}
{title2=$D_f(P\Vert Q)$}
{wiki}

For a <convex function> $f$ satisfying $f(1)=0$, the f-divergence between <probability distributions> $P$ and $Q$ is
$$
D_f(P\Vert Q)=\int qf(p/q)\,d\lambda,
$$
where $p=dP/d\lambda$, $q=dQ/d\lambda$, and the integrand uses the lower-semicontinuous perspective convention at $q=0$.