dreye.compute_jensen_shannon_divergence#

dreye.compute_jensen_shannon_divergence(P, Q, base=2)[source]#

Compute Jensen-Shannon divergence between two probability distributions P and Q.

Parameters:
Pnumpy.ndarray

The first probability distribution.

Qnumpy.ndarray

The second probability distribution.

baseint, optional

The logarithmic base to use, by default 2

Returns:
float

The Jensen-Shannon divergence between P and Q.