Package edu.cmu.tetrad.search.utils
Class DiscriminatingPath
java.lang.Object
edu.cmu.tetrad.search.utils.DiscriminatingPath
Represents a discriminating path in a graph. The triangles that must be oriented this way (won't be done by another
rule) all look like the ABC triangle below, where the dots are a collider path from E to B (excluding E and B but
including A) with each node on the collider path a parent of C. The orientation of A *-* B *-* C is not a feature of
the discriminating path. Note that if there is not a circle at B, the path no longer needs to be oriented by the
rule. Whether the path exists in a given graph and is as yet unoriented can be checked with the existsAndUnorientedIn
method.
B *o * is either an arrowhead or a circle; note B *-> A is not a condition in Zhang's rule / \ v v E....A --> CThis is equivalent to Zhang's rule R4. (Zhang, J. (2008). On the completeness of orientation rules for causal discovery in the presence of latent confounders and selection bias. Artificial Intelligence, 172(16-17), 1873-1896.) A similar rule was originally given in Spirtes et al. (1993). Note that as in Zhang, the discriminating path itself is E...A, B, C. We refer to the part of this path between E to B as the 'collider path.' The collider path is included in any sepset of E and C. Note also that in Zhang's tail-complete version of the rule, the arrow endpoint B *-> A is not a condition of the rule, as in previous code, so we do not check for it.
The idea is that if we know that E is independent of C given all the nodes on the collider path plus perhaps some other nodes in the graph, then there should be a collider at B; otherwise, there should be a noncollider at B. If there should be a collider at B, we orient A *-> B <-> C; otherwise, we orient A *-* B -> C.
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDiscriminatingPath
(Node x, Node w, Node v, Node y, LinkedList<Node> colliderPath, boolean checkEcNonadjacency) Represents a discriminating path construct in a graph. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks this discriminating path construct to make sure it is a discriminating path in the given graph.Returns the collider subpath of the discriminating path.getV()
Returns the node B in the discriminating path.getW()
Retrieves the node A in the discriminating path.getX()
Returns the node E in the discriminating path.getY()
Returns the node C in the discriminating path.toString()
-
Constructor Details
-
DiscriminatingPath
public DiscriminatingPath(Node x, Node w, Node v, Node y, LinkedList<Node> colliderPath, boolean checkEcNonadjacency) Represents a discriminating path construct in a graph. A discriminating path is a path in a graph that meets certain criteria, as explained in the class documentation. This class stores the nodes in the discriminating path, as well as a reference to collider subpath of the discriminating path itself, which consists of all the nodes between E and B along the discriminating path, excluding E and B but including A. These nodes need to be included in any sepset of E and C in the graph, which can be checked.- Parameters:
x
- the node X in the discriminating pathw
- the node W in the discriminating pathv
- the node V in the discriminating pathy
- the node Y in the discriminating pathcolliderPath
- the collider subpath of the discriminating pathcheckEcNonadjacency
- whether to check that E is not adjacent to C
-
-
Method Details
-
existsIn
Checks this discriminating path construct to make sure it is a discriminating path in the given graph. See the class documentation, above, for a description of the requirements.- Parameters:
graph
- the graph to check- Returns:
- true if the discriminating path construct is valid, false otherwise.
-
getX
Returns the node E in the discriminating path.- Returns:
- the node E in the discriminating path.
-
getW
Retrieves the node A in the discriminating path.- Returns:
- the node A in the discriminating path
-
getV
Returns the node B in the discriminating path.- Returns:
- the node B in the discriminating path.
-
getY
Returns the node C in the discriminating path.- Returns:
- the node C in the discriminating path.
-
getColliderPath
-
toString
-