Class DagToPag

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

public final class DagToPag extends Object
Converts a DAG (Directed acyclic graph) into the PAG (partial ancestral graph) which it is in the equivalence class of.
Version:
$Id: $Id
Author:
josephramsey, peterspirtes
  • Constructor Details

    • DagToPag

      public DagToPag(Graph dag)
      Constructs a new FCI search for the given independence test and background knowledge.
      Parameters:
      dag - a Graph object
  • Method Details

    • existsInducingPathInto

      public static boolean existsInducingPathInto(Node x, Node y, Graph graph)

      existsInducingPathInto.

      Parameters:
      x - a Node object
      y - a Node object
      graph - a Graph object
      Returns:
      a boolean
    • convert

      public Graph convert()
      This method does the convertion of DAG to PAG.
      Returns:
      Returns the converted PAG.
    • getKnowledge

      public Knowledge getKnowledge()

      Getter for the field 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.
    • setVerbose

      public void setVerbose(boolean verbose)
      Setws whether verbose output should be printed.
      Parameters:
      verbose - True, if so.
    • setMaxPathLength

      public void setMaxPathLength(int maxPathLength)
      Sets the maximum path length for some rules in the conversion.
      Parameters:
      maxPathLength - This length.
      See Also:
    • setDoDiscriminatingPathRule

      public void setDoDiscriminatingPathRule(boolean doDiscriminatingPathRule)

      Setter for the field doDiscriminatingPathRule.

      Parameters:
      doDiscriminatingPathRule - a boolean