Class R5R9Dijkstra

java.lang.Object
edu.cmu.tetrad.search.utils.R5R9Dijkstra

public class R5R9Dijkstra extends Object
A modified implementation of Dijkstra's shortest path algorithm for the R5 and R9 rules from 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. These are rules that involve finding uncovered paths of various sorts in a graph; we use a modificiation of Dejkstra as a fast implementation of that requirement suitable for large graphs.

We report distances as total weights along the shortest path from the start node to the y node, where by default the weight of each edge is 1. We report unreachable nodes as at a distance of Integer.MAX_VALUE. Edges in the graph are dynamically calculated by the algorithm using two methods--looking for o-o edges only, suitable for the R5 rule, and looking for edges along potentially directed paths (i.e., semidirected paths), suitable for the R9 rule. The end node is used to stop the algorithm once that node has been visited, so that a shortest path has been found.

The algorithm is constrained to avoid certain paths. The start *-* end edge itself and start *-* z *-* end paths are avoided, to avoid length 1 or length 2 paths. Also, covered triples, z *-* r *-* w, z *-* w, are avoided to implement the constraint that only uncovered paths are considered. Coverings of end *-* start *-* z and start *-* end *-* w are also avoided, as specified for R5 and R9.

Author:
josephramsey 2024-8-6