MillerMadowCMIEstimator

MillerMadowCMIEstimator#

class infomeasure.estimators.mutual_information.MillerMadowCMIEstimator(*data, cond=None, offset: int = 0, base: int | float | str = 'e', **kwargs)[source]

Bases: BaseMillerMadowMIEstimator, ConditionalMutualInformationEstimator

Estimator for the discrete Miller-Madow conditional mutual information.

\[\begin{align} \hat{I}_{\tiny{MM}}(X_1; X_2; \ldots; X_n \mid Z)&= \hat{I}_{\tiny{MLE}}(\dots) + \frac{\left(\sum_{i=1}^{n}K_{iZ}-1\right) - \left(K_{1,\dots,i,Z}-1\right) - \left(K_{Z}-1\right)}{2N \cdot \log(\texttt{base})} \end{align}\]

\(\hat{I}_{\tiny{MLE}}(X_1; \dots; X_n \mid Z)\) is the initial DiscreteCMIEstimator estimate, \(K_{iZ}\) is the number of unique values in the i-th variable joint with Z, \(K_{1,\dots,i,Z}\) is the number of unique joint values, \(K_Z\) is the number of unique values in the Z variable, and \(N\) is the number of samples.

Attributes:
*dataarray_like, shape (n_samples,)

The data used to estimate the conditional mutual information. You can pass an arbitrary number of data arrays as positional arguments.

condarray_like

The conditional data used to estimate the conditional mutual information.