Previous topic

bioa.util.validation.shannon_entropy

Next topic

bioa.util.validation.kullback_leibler_divergence

This Page

bioa.util.validation.jensen_shannon_divergence

jensen_shannon_divergence(real, predicted)[source]

Quasi-metric for computing relative entropy with a midpoint. It is for computing Kullback-Leibler Divergence when the sets for comparison might not contain the same elements.

Parameters :

real : dict

A dictionary mapping quasispecies to frequencies.

predicted : dict

the calculated dictionary mapping quasispecies to frequencies.

Returns :

divergence : float

The “distance” between the two distributions. Formally, the quality of the approximation of one distribution by the other distribution.