CorrectedMutualInformation¶
- class otagrum.CorrectedMutualInformation(*args)¶
CorrectedMutualInformation class.
- Parameters:
- data2-d sequence of float
The data set.
Methods
Clear cache containing the cross-entropies that are used to compute mutual information.
Return the corrected mutual information between variables X and Y conditionally to the variable set U (possibly empty).
Return the corrected three-point information between variables X, Y and Z conditionally to the variable set U (possibly empty).
getAlpha
()Returns the alpha correction value of mutual information when using the Naive KMode.
Return the description (variable names) of the underlying data set.
Returns the dimension of the underlying data set.
getSize
()Returns the size of the underlying data set.
setAlpha
(alpha)Displays the skeleton graph to dot
setCMode
(cmode)Change the copula model used for computing corrected mutual information.
setKMode
(kmode)Change the correction mode for mutual information.
getCMode
getKMode
- __init__(*args)¶
- clearCaches()¶
Clear cache containing the cross-entropies that are used to compute mutual information.
- compute2PtCorrectedInformation(*args)¶
Return the corrected mutual information between variables X and Y conditionally to the variable set U (possibly empty).
- Parameters:
- Xint
X node id.
- Yint
Y node id.
- Ulist
List of node ids in the (possibly empty) set U
- Returns:
- infofloat
The corrected mutual information I’(X;Y|U).
Notes
The mutual information is computed from the cross-entropy H of the copula using the relation I(X;Y|U) = H(X,U) + H(Y,U) - H(X,Y,U) - H(U).
- compute3PtCorrectedInformation(*args)¶
Return the corrected three-point information between variables X, Y and Z conditionally to the variable set U (possibly empty).
- Parameters:
- Xint
X node id.
- Yint
Y node id.
- Zint
Z node id.
- Ulist
List of node ids in the (possibly empty) set U
- Returns:
- infofloat
The corrected three-point information I’(X;Y;Z|U).
Notes
The three-point information is computed from mutual information using the relation I(X;Y;Z|U) = I(X;Y|U) - I(X;Y|U,Z).
- getAlpha()¶
Returns the alpha correction value of mutual information when using the Naive KMode.
- Returns:
- alphafloat
Correction value.
- getDataDescription()¶
Return the description (variable names) of the underlying data set.
- Returns:
- description
Description
Data description.
- description
- getDimension()¶
Returns the dimension of the underlying data set.
- Returns:
- dimensionint
Dimension of the data set.
- getSize()¶
Returns the size of the underlying data set.
- Returns:
- sizeint
Size of the data set.
- setAlpha(alpha)¶
Displays the skeleton graph to dot
- Parameters:
- pdag
pyAgrum.UndiGraph
dag
- pdag
- Returns:
- dotstr
Dot format representation
- setCMode(cmode)¶
Change the copula model used for computing corrected mutual information.
- Parameters:
- cmodeCorrectedMutualInformation.CModeTypes
Copula model (Gaussian or Bernstein).
- setKMode(kmode)¶
Change the correction mode for mutual information.
- Parameters:
- kmodeCorrectedMutualInformation.KModeTypes
Correction mode (NoCorr or Naive)