ContinuousMIIC¶
- class otagrum.ContinuousMIIC(*args)¶
ContinuousMIIC learner.
- Parameters:
- data2-d sequence of float
The data
Methods
addForbiddenArc
(*args)The arc will not be added in the learned DAG.
addMandatoryArc
(*args)The arc will be added in the learned DAG.
getAlpha
()Returns the alpha correction value of mutual information when using the naive KMode.
Latent variables accessor.
Returns the verbosity flag value.
learnDAG
()Learn the DAG from data.
Learn the PDAG from data.
Learn the skeleton from data.
setAlpha
(alpha)Set the alpha correction value of mutual information when using the naive KMode.
setCMode
(cmode)Change the copula model used for computing corrected mutual information.
setKMode
(kmode)Change the correction mode for mutual information.
setVerbosity
(verbose)Change the value of verbosity flag.
Notes
MIIC algorithm is a hybrid method between contrained and score based methods. It allows one to learn the structure of a bayesian network and consists in three steps : skeleton learning, V-structure searching and constraint propagation. These steps rely on an information theoretic score.
- __init__(*args)¶
- addForbiddenArc(*args)¶
The arc will not be added in the learned DAG.
- Parameters:
- arc
pyAgrum.Arc
- headint
Head node id
- tailint
Tail node id
- headstr
Name of the head node
- tailstr
Name of the tail node
- arc
- addMandatoryArc(*args)¶
The arc will be added in the learned DAG. This allows one to add prior structural knowledge.
- Parameters:
- arc
pyAgrum.Arc
- headint
Head node id
- tailint
Tail node id
- headstr
Name of the head node
- tailstr
Name of the tail node
- arc
- getAlpha()¶
Returns the alpha correction value of mutual information when using the naive KMode.
- Returns:
- alphafloat
Correction value
- getLatentVariables()¶
Latent variables accessor.
- Returns:
- varssequence of
pyAgrum.Arc
- varssequence of
- getVerbosity()¶
Returns the verbosity flag value.
- Returns:
- verbosebool
Verbosity flag value
- learnDAG()¶
Learn the DAG from data.
- Returns:
- dag
NamedDAG
the learned DAG
- dag
Notes
This step starts with the learned PDAG and orient the remaining undirected edges by avoiding to add new V-structures unless it implies to create an oriented circle.
- learnPDAG()¶
Learn the PDAG from data.
- Returns:
- gum::MixedGraph
pyAgrum.MixedGraph
the learned PDAG
- gum::MixedGraph
Notes
Starting with the learned skeleton, each triplet of variables X, Y, Z such that X-Z-Y and such that there is no edge between X and Y is oriented as X->Z<-Y if its (corrected) three-point conditional information is negative and as X->Z->Y (or X<-Z<-Y) if not.
- learnSkeleton()¶
Learn the skeleton from data.
- Returns:
- gum::UndiGraph
pyAgrum.UndiGraph
The learned skeleton
- gum::UndiGraph
Notes
The skeleton is obtained starting from the complete undirected graph on the set of variables and removing edges which (corrected) conditional mutual information is negative.
- setAlpha(alpha)¶
Set the alpha correction value of mutual information when using the naive KMode.
- Parameters:
- alphafloat
Correction value
- 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.CModeTypes
Correction mode (NoCorr or Naive)
- setVerbosity(verbose)¶
Change the value of verbosity flag.
- Parameters:
- verbosebool
New verbosity flag value. If True, a lot of details about the learning procedure are printed.