Package edu.cmu.tetrad.search.utils
Class DagToPag
java.lang.Object
edu.cmu.tetrad.search.utils.DagToPag
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 TypeMethodDescriptionstatic Graph
calcAdjacencyGraph
(Graph dag) Calculates the adjacency graph for the given Directed Acyclic Graph (DAG).convert()
This method does the conversion of DAG to PAG.static R0R4StrategyTestBased
getFinalStrategyUsingDsep
(Graph mag, Knowledge knowledge, boolean verbose) Returns the final strategy for finding a PAG using D-SEP.Getter for the fieldknowledge
.boolean
isCompleteRuleSetUsed.void
setCompleteRuleSetUsed
(boolean completeRuleSetUsed) Setter for the fieldcompleteRuleSetUsed
.void
setKnowledge
(Knowledge knowledge) Setter for the fieldknowledge
.void
setVerbose
(boolean verbose) Setws whether verbose output should be printed.
-
Constructor Details
-
DagToPag
-
-
Method Details
-
calcAdjacencyGraph
-
getFinalStrategyUsingDsep
public static R0R4StrategyTestBased getFinalStrategyUsingDsep(Graph mag, Knowledge knowledge, boolean verbose) Returns the final strategy for finding a PAG using D-SEP.- Parameters:
mag
- the MAG (Maximum Ancestral Graph) representation of the graphknowledge
- the background knowledge used for the orientationverbose
- a boolean indicating whether verbose output should be printed- Returns:
- the final strategy for finding a PAG using D-SEP
-
convert
This method does the conversion of DAG to PAG.- Returns:
- Returns the converted PAG.
-
getKnowledge
-
setKnowledge
-
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.
-