5.6.2.4. statsmodels.sandbox.infotheo.covent¶
-
statsmodels.sandbox.infotheo.
covent
(px, py, pxpy, logbase=2)[source]¶ An information theoretic covariance measure.
Reflects linear and nonlinear correlation between two random variables X and Y, characterized by the discrete probability distributions px and py respectively.
Parameters: px : array-like
Discrete probability distribution of random variable X
py : array-like
Discrete probability distribution of random variable Y
pxpy : 2d array-like, optional
Joint probability distribution of X and Y. If pxpy is None, X and Y are assumed to be independent.
logbase : int or np.e, optional
Default is 2 (bits)
Returns: condent(px,py,pxpy,logbase=logbase) + condent(py,px,pxpy,
logbase=logbase)
Notes
This is also equivalent to
covent(px,py,pxpy) = condent(px,py,pxpy) + condent(py,px,pxpy)