Class SepsetsGreedy

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

public class SepsetsGreedy extends Object implements SepsetProducer
Provides a SepsetProcuder that selects the first sepset it comes to from among the extra sepsets or the adjacents of i or k, or null if none is found.
Version:
$Id: $Id
Author:
josephramsey
See Also:
  • Constructor Details

  • Method Details

    • getSepset

      public Set<Node> getSepset(Node i, Node k)
      Retrieves the sepset (separating set) between two nodes, or null if no such sepset is found.
      Specified by:
      getSepset in interface SepsetProducer
      Parameters:
      i - The first node
      k - The second node
      Returns:
      The sepset between the two nodes
    • getSepsetContaining

      public Set<Node> getSepsetContaining(Node i, Node k, Set<Node> s)
      Retrieves a sepset (separating set) between two nodes containing a set of nodes, or null if no such sepset is found. If there is no required set of nodes, pass null for the set.
      Specified by:
      getSepsetContaining in interface SepsetProducer
      Parameters:
      i - The first node
      k - The second node
      s - The set of nodes that must be contained in the sepset, or null if no such set is required.
      Returns:
      The sepset between the two nodes
    • isUnshieldedCollider

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

      isUnshieldedCollider.

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

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

      isIndependent.

      Specified by:
      isIndependent in interface SepsetProducer
      Parameters:
      a - a Node object
      b - a Node object
      sepset - a Set object
      Returns:
      a boolean
    • getPValue

      public double getPValue(Node a, Node b, Set<Node> sepset)
      Returns the p-value for the independence test between two nodes, given a set of separator nodes.
      Specified by:
      getPValue in interface SepsetProducer
      Parameters:
      a - the first node
      b - the second node
      sepset - the set of separator nodes
      Returns:
      the p-value for the independence test
    • getScore

      public double getScore()

      getScore.

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

      public List<Node> getVariables()

      getVariables.

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

      public boolean isVerbose()

      isVerbose.

      Returns:
      a boolean
    • setVerbose

      public void setVerbose(boolean verbose)

      setVerbose.

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

      public Graph getDag()

      getDag.

      Returns:
      a Graph object
    • setDepth

      public void setDepth(int depth)

      Setter for the field depth.

      Parameters:
      depth - a int