Previous topic


Next topic


This Page


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.