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.
Version:
$Id: $Id
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)

      getSepset.

      Returns the list of sepset for {a, b}.

      Specified by:
      getSepset in interface SepsetProducer
      Parameters:
      a - a Node object
      b - a Node object
      Returns:
      a Set object
    • isUnshieldedCollider

      public boolean isUnshieldedCollider(Node i, Node j, Node k)

      isUnshieldedCollider.

      True iff i*-*j*-*k is an unshielded collider.

      Specified by:
      isUnshieldedCollider in interface SepsetProducer
      Parameters:
      i - a Node object
      j - a Node object
      k - a Node object
      Returns:
      a boolean
    • getScore

      public double getScore()

      getScore.

      Not implemented; required for an interface.

      Specified by:
      getScore in interface SepsetProducer
      Returns:
      a double
    • isIndependent

      public boolean isIndependent(Node a, Node b, Set<Node> c)

      isIndependent.

      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 - a Node object
      b - a Node object
      c - a Set object
      Returns:
      a boolean
    • getVariables

      public List<Node> getVariables()

      getVariables.

      Returns the nodes in the DAG.

      Specified by:
      getVariables in interface SepsetProducer
      Returns:
      a List object
    • setVerbose

      public void setVerbose(boolean verbose)

      setVerbose.

      Thsi method is not used.

      Specified by:
      setVerbose in interface SepsetProducer
      Parameters:
      verbose - a boolean
    • getDag

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