Package edu.cmu.tetrad.search.utils
Interface R0R4Strategy
- All Known Implementing Classes:
R0R4StrategyScoreBased
,R0R4StrategyTestBased
public interface R0R4Strategy
The FCI orientation rules are almost entirely taken up with an examination of the FCI graph, but there are two rules
that require looking at the distribution. The first is the R0 rule, which orients unshielded colliders in the graph.
The second is the R4 rule, which orients certain colliders or tails based on an examination of discriminating paths.
For the discriminating path rule, we need to know the sepset for two nodes, e and c, which can only be determined by
looking at the distribution.
Note that for searches from Oracle, the distribution is not available, but these rules can be applied using knowledge of the true DAG (with latents).
Since this can be done in various ways, we separate out a Strategy here for this purpose.
- Author:
- josephramsey
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.lang3.tuple.Pair
<DiscriminatingPath, Boolean> doDiscriminatingPathOrientation
(DiscriminatingPath discriminatingPath, Graph graph, Set<Node> vNodes) Does a discriminating path orientation based on an examination of the data.Returns the allowed colliders for the current strategy.Returns the knowledge object used by the strategy.boolean
isUnshieldedCollider
(Graph graph, Node a, Node b, Node c) Determines if a given triple is an unshielded collider based on an examination of the data.void
setAllowedColliders
(Set<Triple> allowedColliders) Sets the allowed colliders for the current strategy.default void
setInitialAllowedColliders
(HashSet<Triple> initialAllowedColliders) Sets the initial allowed colliders for the current strategy.void
setKnowledge
(Knowledge knowledge) Sets the knowledge object to be used by the strategy.
-
Method Details
-
isUnshieldedCollider
Determines if a given triple is an unshielded collider based on an examination of the data.- Parameters:
graph
- the graph representationa
- the first node of the collider pathb
- the second node of the collider pathc
- the third node of the collider path- Returns:
- true if the collider is unshielded, false otherwise
-
doDiscriminatingPathOrientation
org.apache.commons.lang3.tuple.Pair<DiscriminatingPath,Boolean> doDiscriminatingPathOrientation(DiscriminatingPath discriminatingPath, Graph graph, Set<Node> vNodes) throws InterruptedException Does a discriminating path orientation based on an examination of the data.- Parameters:
discriminatingPath
- the discriminating path constructgraph
- the graph to be oriented.vNodes
- the set of nodes that are v-structures in the graph.- Returns:
- a pair of the discriminating path construct and a boolean indicating whether the orientation was determined.
- Throws:
InterruptedException
- See Also:
-
setKnowledge
Sets the knowledge object to be used by the strategy.- Parameters:
knowledge
- the knowledge object.
-
getknowledge
Knowledge getknowledge()Returns the knowledge object used by the strategy.- Returns:
- the knowledge object.
-
setAllowedColliders
-
getInitialAllowedColliders
-
setInitialAllowedColliders
-