KLDivergences.jl

Implement different KL Divergences analytically or by sampling
Author theogf
Popularity
4 Stars
Updated Last
1 Year Ago
Started In
October 2020

!! The content of this package has now been improved and directly integrated in Distributions.jl !!

(For more details see this PR)

KLDivergences

BuildStatus Coverage Status

Compute KL Divergences using Distributions.jl objects either analytically (PR are welcome to enrich the library) or via Monte Carlo sampling.

There is only one function exported : KL which takes two arguments p and q for an analytical formulation and an additional argument n_samples for the sampling based approach.

The list of the pair of distributions supported analytically is given here

Univariate distributions

p q
Normal Normal
Poisson Poisson
Exponential Exponential
Gamma Gamma
InverseGamma InverseGamma
Beta Beta

Multivariate distributions

p q
MvNormal MvNormal
AbstractMvNormal* AbstractMvNormal*

* Note that the generic approach is not optimized but only requires you to define mean(p) and cov(p) on your distribution

Used By Packages

No packages found.