Interaction Information

The interaction information is equal in magnitude to the co-information, but has the opposite sign when taken over an odd number of variables:

\[\begin{split}\II(X_{0:n}) &= (-1)^{n} \cdot \I(X_{0:n})\end{split}\]

Interaction information was first studied in the 3-variable case which, for \(X_{0:3} = X_0X_1X_2\), takes the following form:

\[\II(X_0:X_1:X_2) = \I(X_0:X_1|X_2) - \I(X_0:X_1)\]

The extension to \(n>3\) proceeds recursively. For example,

\[\begin{split}\II(X_0:X_1:X_2:X_3) &= \II(X_0:X_1:X_2|X_3) - \II(X_0:X_1:X_2) \\ &= \I(X_0:X_1|X_2,X_3) - \I(X_0:X_1|X_3) \\ &\qquad - \I(X_0:X_1|X_2) + \I(X_0:X_1)\end{split}\]
interaction_information(dist, rvs=None, crvs=None, rv_names=None)[source]

Calculates the interaction information.

Parameters :
  • dist (Distribution) – The distribution from which the interaction information is calculated.
  • rvs (list, None) – The indexes of the random variable used to calculate the interaction information between. If None, then the interaction information is calculated over all random variables.
  • crvs (list, None) – The indexes of the random variables to condition on. If None, then no variables are condition on.
  • rv_names (bool) – If True, then the elements of rvs are treated as random variable names. If False, then the elements of rvs are treated as random variable indexes. If None, then the value True is used if the distribution has specified names for its random variables.
Returns:

II (float) – The interaction information.

Raises :

ditException – Raised if dist is not a joint distribution.

Read the Docs v: dev
Versions
latest
dev
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.