5.6.2.13. statsmodels.sandbox.infotheo.shannoninfo

statsmodels.sandbox.infotheo.shannoninfo(px, logbase=2)[source]

Shannon’s information

Parameters:

px : float or array-like

px is a discrete probability distribution

Returns:

For logbase = 2

np.log2(px)