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 / \ 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.) The 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.
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 e, Node a, Node b, Node c, LinkedList<Node> colliderPath) Represents a discriminating path construct in a graph. -
Method Summary
Modifier and TypeMethodDescriptionboolean
existsAndUnorientedIn
(Graph graph) Checks this discriminating path construct to make sure it is a discriminating path in the given graph.getA()
Retrieves the node A in the discriminating path.getB()
Returns the node B in the discriminating path.getC()
Returns the node C in the discriminating path.Returns the collider subpath of the discriminating path.getE()
Returns the node E in the discriminating path.toString()
-
Constructor Details
-
DiscriminatingPath
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 of 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:
e
- the node E in the discriminating patha
- the node A in the discriminating pathb
- the node B in the discriminating pathc
- the node C in the discriminating pathcolliderPath
- the collider subpath of the discriminating path
-
-
Method Details
-
existsAndUnorientedIn
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.
- Throws:
IllegalArgumentException
- if 'e' is adjacent to 'c'
-
getE
Returns the node E in the discriminating path.- Returns:
- the node E in the discriminating path.
-
getA
Retrieves the node A in the discriminating path.- Returns:
- the node A in the discriminating path
-
getB
Returns the node B in the discriminating path.- Returns:
- the node B in the discriminating path.
-
getC
Returns the node C in the discriminating path.- Returns:
- the node C in the discriminating path.
-
getColliderPath
Returns the collider subpath of the discriminating path.- Returns:
- the collider subpath of the discriminating path.
-
toString
-