Package edu.cmu.tetrad.search.utils
Class MeekRules
java.lang.Object
edu.cmu.tetrad.search.utils.MeekRules
Implements Meek's complete orientation rule set for PC (Chris Meek (1995), "Causal inference and causal explanation
with background knowledge"), modified for Conservative PC to check noncolliders against recorded noncolliders before
orienting.
Rule R4 is only performed if knowledge is nonempty.
- Author:
- josephramsey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a complete set of all the edges that were changed in the course of orientation, as a map from the previous edges in the graph to the new, changed edges for the same node pair.orientImplied
(Graph graph) Uses the Meek rules to do as many orientations in the given graph as possible.void
setKnowledge
(Knowledge knowledge) Sets the knowledge to be used in the orientation.void
setMeekPreventCycles
(boolean meekPreventCycles) Sets whether cycles should be prevented by cycle checking.void
setRevertToUnshieldedColliders
(boolean revertToUnshieldedColliders) Sets whether orientations in the graph should be reverted to its unshielded colliders before performing any Meek rule orientations.void
setVerbose
(boolean verbose) Sets whether verbose output should be printed.
-
Constructor Details
-
MeekRules
public MeekRules()Constructs theMeekRules
with no logging.
-
-
Method Details
-
orientImplied
Uses the Meek rules to do as many orientations in the given graph as possible.- Parameters:
graph
- The graph.- Returns:
- The set of nodes that were visited in this orientation.
-
setKnowledge
Sets the knowledge to be used in the orientation.- Parameters:
knowledge
- The knowledge.- See Also:
-
setMeekPreventCycles
public void setMeekPreventCycles(boolean meekPreventCycles) Sets whether cycles should be prevented by cycle checking.- Parameters:
meekPreventCycles
- True, if so.
-
getChangedEdges
Returns a complete set of all the edges that were changed in the course of orientation, as a map from the previous edges in the graph to the new, changed edges for the same node pair. For example, if X->Y was changed to X<-Y, thie map will send X->Y to X<-Y.- Returns:
- This map.
-
setVerbose
public void setVerbose(boolean verbose) Sets whether verbose output should be printed.- Parameters:
verbose
- True, if so.
-
setRevertToUnshieldedColliders
public void setRevertToUnshieldedColliders(boolean revertToUnshieldedColliders) Sets whether orientations in the graph should be reverted to its unshielded colliders before performing any Meek rule orientations.- Parameters:
revertToUnshieldedColliders
- True, if so.
-