statsmodels.sandbox.分布.变换.TransfTwo_gen.熵

TransfTwo_gen.entropy(*args, **kwds)

随机变量的微分熵。

Parameters:
arg1, arg2, arg3,…array_like

分布的形状参数(有关更多信息,请参阅实例对象的文档字符串)。

locarray_like, optional

位置参数(默认=0)。

scalearray_like, optional (continuous distributions only).

尺度参数(默认值=1)。

注释

熵的定义基于 e

>>> import numpy as np
>>> from scipy.stats._distn_infrastructure import rv_discrete
>>> drv = rv_discrete(values=((0, 1), (0.5, 0.5)))
>>> np.allclose(drv.entropy(), np.log(2.0))
True

Last update: Oct 16, 2024