Package edu.cmu.tetrad.search.utils
Class MagToPag
java.lang.Object
edu.cmu.tetrad.search.utils.MagToPag
Converts a MAG to a PAG.
- Version:
- $Id: $Id
- Author:
- josephramsey, peterspirtes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(boolean checkMag) This method does the conversion of MAG to PAG.static R0R4StrategyTestBasedgetFinalStrategyUsingDsep(Graph mag, Knowledge knowledge, boolean verbose) Returns the final strategy for finding a PAG using D-SEP.Getter for the fieldknowledge.booleanisCompleteRuleSetUsed.voidsetCompleteRuleSetUsed(boolean completeRuleSetUsed) Setter for the fieldcompleteRuleSetUsed.voidsetKnowledge(Knowledge knowledge) Setter for the fieldknowledge.voidsetVerbose(boolean verbose) Setws whether verbose output should be printed.
-
Constructor Details
-
MagToPag
Constructs a new FCI search for the given independence test and background knowledge.- Parameters:
mag- aGraphobject
-
-
Method Details
-
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 verabose output should be printed- Returns:
- the final strategy for finding a PAG using D-SEP
-
convert
This method does the conversion of MAG to PAG.- Parameters:
checkMag- Whether to check if the MAG is legal before conversion.- Returns:
- Returns the converted PAG.
-
getKnowledge
Getter for the field
knowledge.- Returns:
- a
Knowledgeobject
-
setKnowledge
Setter for the field
knowledge.- Parameters:
knowledge- aKnowledgeobject
-
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.
-