Package edu.cmu.tetrad.search.utils
Class DagToPag2
java.lang.Object
edu.cmu.tetrad.search.utils.DagToPag2
Converts a DAG (Directed acyclic graph) into the PAG (partial ancestral graph) which it is in the equivalence class
of.
- Version:
- $Id: $Id
- Author:
- josephramsey, peterspirtes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert()
This method does the convertion of DAG to PAG.static boolean
existsInducingPathInto
(Node x, Node y, Graph graph) existsInducingPathInto.Getter for the fieldknowledge
.boolean
isCompleteRuleSetUsed.void
setCompleteRuleSetUsed
(boolean completeRuleSetUsed) Setter for the fieldcompleteRuleSetUsed
.void
setDoDiscriminatingPathColliderRule
(boolean doDiscriminatingPathColliderRule) Sets whether the discriminating path collider rule should be used.void
setDoDiscriminatingPathTailRule
(boolean doDiscriminatingPathTailRule) Sets whether the discriminating path tail rule should be used.void
setKnowledge
(Knowledge knowledge) Setter for the fieldknowledge
.void
setMaxPathLength
(int maxPathLength) Sets the maximum length of any discriminating path.void
setVerbose
(boolean verbose) Setws whether verbose output should be printed.
-
Constructor Details
-
DagToPag2
Constructs a new FCI search for the given independence test and background knowledge.- Parameters:
dag
- aGraph
object
-
-
Method Details
-
existsInducingPathInto
existsInducingPathInto.
-
convert
This method does the convertion of DAG to PAG.- Returns:
- Returns the converted PAG.
-
getKnowledge
Getter for the field
knowledge
.- Returns:
- a
Knowledge
object
-
setKnowledge
Setter for the field
knowledge
.- Parameters:
knowledge
- aKnowledge
object
-
isCompleteRuleSetUsed
public boolean isCompleteRuleSetUsed()isCompleteRuleSetUsed.
- Returns:
- true if Zhang's complete rule set should be used, false if only R1-R4 (the rule set of the original FCI) should be used. False by default.
-
setCompleteRuleSetUsed
public void setCompleteRuleSetUsed(boolean completeRuleSetUsed) Setter for the field
completeRuleSetUsed
.- Parameters:
completeRuleSetUsed
- set to true if Zhang's complete rule set should be used, false if only R1-R4 (the rule set of the original FCI) should be used. False by default.
-
setVerbose
public void setVerbose(boolean verbose) Setws whether verbose output should be printed.- Parameters:
verbose
- True, if so.
-
setMaxPathLength
public void setMaxPathLength(int maxPathLength) Sets the maximum length of any discriminating path.- Parameters:
maxPathLength
- the maximum length of any discriminating path, or -1 if unlimited.
-
setDoDiscriminatingPathTailRule
public void setDoDiscriminatingPathTailRule(boolean doDiscriminatingPathTailRule) Sets whether the discriminating path tail rule should be used.- Parameters:
doDiscriminatingPathTailRule
- True, if so.
-
setDoDiscriminatingPathColliderRule
public void setDoDiscriminatingPathColliderRule(boolean doDiscriminatingPathColliderRule) Sets whether the discriminating path collider rule should be used.- Parameters:
doDiscriminatingPathColliderRule
- True, if so.
-