Class SvarFciOrient

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

public final class SvarFciOrient extends Object

Adapts FciOrient for the SvarFCI algorithm. The main difference is that if an edge is orient, it will also orient all homologous edges to preserve the time-repeating structure assumed by SvarFCI. Based on (but not identicial to) code by Entner and Hoyer for their 2010 paper. Modified by DMalinsky 4/20/2016.

This class is configured to respect knowledge of forbidden and required edges, including knowledge of temporal tiers.

Version:
$Id: $Id
Author:
dmalinsky
See Also:
  • Constructor Details

  • Method Details

    • orient

      public Graph orient(Graph graph)

      orient.

      Parameters:
      graph - a Graph object
      Returns:
      a Graph object
    • getSepsets

      public SepsetProducer getSepsets()

      Getter for the field sepsets.

      Returns:
      a SepsetProducer object
    • getKnowledge

      public Knowledge getKnowledge()
      The background knowledge.
      Returns:
      a Knowledge object
    • setKnowledge

      public void setKnowledge(Knowledge knowledge)

      Setter for the field knowledge.

      Parameters:
      knowledge - a Knowledge object
    • isCompleteRuleSetUsed

      public boolean isCompleteRuleSetUsed()

      isCompleteRuleSetUsed.

      Returns:
      true if Zhang's complete rule set should be used, false if only R1-R4 (the rule set of the original FCI) should be used. False by default.
    • setCompleteRuleSetUsed

      public void setCompleteRuleSetUsed(boolean completeRuleSetUsed)

      Setter for the field completeRuleSetUsed.

      Parameters:
      completeRuleSetUsed - set to true if Zhang's complete rule set should be used, false if only R1-R4 (the rule set of the original FCI) should be used. False by default.
    • ruleR0

      public void ruleR0(Graph graph)
      Orients colliders in the graph. (FCI Step C)

      Zhang's step F3, rule R0.

      Parameters:
      graph - a Graph object
    • doFinalOrientation

      public void doFinalOrientation(Graph graph)
      Orients the graph according to rules in the graph (FCI step D).

      Zhang's step F4, rules R1-R10.

      Parameters:
      graph - a Graph object
    • rulesR1R2cycle

      public void rulesR1R2cycle(Graph graph)

      rulesR1R2cycle.

      Parameters:
      graph - a Graph object
    • ruleR3

      public void ruleR3(Graph graph)
      Implements the double-triangle orientation rule, which states that if D*-oB, A*->B<-*C and A*-oDo-*C, then D*->B.

      This is Zhang's rule R3.

      Parameters:
      graph - a Graph object
    • ruleR4B

      public void ruleR4B(Graph graph)
      The triangles that must be oriented this way (won't be done by another rule) all look like the ones below, where the dots are a collider path from L to A with each node on the path (except L) a parent of C.
                B
               xo           x is either an arrowhead or a circle
              /  \
             v    v
       L....A --> C
       

      This is Zhang's rule R4, discriminating undirectedPaths.

      Parameters:
      graph - a Graph object
    • ddpOrient

      public void ddpOrient(Node a, Node b, Node c, Graph graph)
      a method to search "back from a" to find a DDP. It is called with a reachability list (first consisting only of a). This is breadth-first, utilizing "reachability" concept from Geiger, Verma, and Pearl 1990. The body of a DDP consists of colliders that are parents of c.
      Parameters:
      a - a Node object
      b - a Node object
      c - a Node object
      graph - a Graph object
    • ruleR5

      public void ruleR5(Graph graph)
      Implements Zhang's rule R5, orient circle undirectedPaths: for any Ao-oB, if there is an uncovered circle path u = [A,C,...,D,B] such that A,D nonadjacent and B,C nonadjacent, then A---B and orient every edge on u undirected.
      Parameters:
      graph - a Graph object
    • ruleR6R7

      public void ruleR6R7(Graph graph)
      Implements Zhang's rules R6 and R7, applies them over the graph once. Orient single tails. R6: If A---Bo-*C then A---B--*C. R7: If A--oBo-*C and A,C nonadjacent, then A--oB--*C
      Parameters:
      graph - a Graph object
    • rulesR8R9R10

      public void rulesR8R9R10(Graph graph)
      Implements Zhang's rules R8, R9, R10, applies them over the graph once. Orient arrow tails. I.e., tries R8, R9, and R10 in that sequence on each Ao->C in the graph.
      Parameters:
      graph - a Graph object
    • getMaxPathLength

      public int getMaxPathLength()

      Getter for the field maxPathLength.

      Returns:
      the maximum length of any discriminating path, or -1 of unlimited.
    • setMaxPathLength

      public void setMaxPathLength(int maxPathLength)

      Setter for the field maxPathLength.

      Parameters:
      maxPathLength - the maximum length of any discriminating path, or -1 if unlimited.
    • isVerbose

      public boolean isVerbose()
      True iff verbose output should be printed.
      Returns:
      a boolean
    • setVerbose

      public void setVerbose(boolean verbose)

      Setter for the field verbose.

      Parameters:
      verbose - a boolean
    • getTruePag

      public Graph getTruePag()
      The true PAG if available. Can be null.
      Returns:
      a Graph object
    • setTruePag

      public void setTruePag(Graph truePag)

      Setter for the field truePag.

      Parameters:
      truePag - a Graph object
    • getNameNoLag

      public String getNameNoLag(Object obj)

      getNameNoLag.

      Parameters:
      obj - a Object object
      Returns:
      a String object