Wilang Documentation1.0.0+4

kldivergence#

Calculate the Kullback-Leibler (KL) divergence between two distributions.

Available in: math cells, REPL.

Syntax#

kldivergence(x, y)

Arguments and behavior#

Integer counts must satisfy the function domain. Random functions do not promise a fixed sample. The example returns scalar (number).

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
kldivergence([0.5,0.5],[0.25,0.75])

Expected result: 0.14384103622589.

All functions · Math guides