Class DagSepsets

java.lang.Object
edu.cmu.tetrad.search.utils.DagSepsets
All Implemented Interfaces:
SepsetProducer

public class DagSepsets extends Object implements SepsetProducer
Determines sepsets, collider, and noncolliders by examining d-separation facts in a DAG.
Author:
josephramsey
  • Constructor Details

    • DagSepsets

      public DagSepsets(Graph dag)
      Constructs a new DagSepsets object for the given DAG.
      Parameters:
      dag - the DAG.
  • Method Details

    • getSepset

      public Set<Node> getSepset(Node a, Node b)
      Returns the list of sepset for {a, b}.
      Specified by:
      getSepset in interface SepsetProducer
      Parameters:
      a - One node.
      b - The other node.
      Returns:
      The list of sepsets for {a, b}.
    • isUnshieldedCollider

      public boolean isUnshieldedCollider(Node i, Node j, Node k)
      True iff i*-*j*-*k is an unshielded collider.
      Specified by:
      isUnshieldedCollider in interface SepsetProducer
      Parameters:
      i - Node 1
      j - Node 2
      k - Node 3
      Returns:
      True if the condition holds.
    • getScore

      public double getScore()
      Not implemented; required for an interface.
      Specified by:
      getScore in interface SepsetProducer
      Throws:
      javax.help.UnsupportedOperationException - Since this is not implemented.
    • isIndependent

      public boolean isIndependent(Node a, Node b, Set<Node> c)
      Returns true just in case msep(a, b | c) in the DAG. Don't let the name isIndependent fool you; this is a d-separation method. We only use the name isIndependent so that this can be used in place of an independence check.
      Specified by:
      isIndependent in interface SepsetProducer
      Parameters:
      a - Node 1
      b - NOde 2
      c - A set of conditoning nodes.
      Returns:
      True if the condition holds.
    • getVariables

      public List<Node> getVariables()
      Returns the nodes in the DAG.
      Specified by:
      getVariables in interface SepsetProducer
      Returns:
      This list.
    • setVerbose

      public void setVerbose(boolean verbose)
      Thsi method is not used.
      Specified by:
      setVerbose in interface SepsetProducer
      Throws:
      javax.help.UnsupportedOperationException - Since this method is not used (but is required by an interface).
    • getDag

      public Graph getDag()
      Returns the DAG being analyzed.
      Returns:
      This DAG.