Class SepsetsPossibleMsep

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

public class SepsetsPossibleMsep extends Object implements SepsetProducer

Provides a sepset producer using conditional independence tests to generate the Sepset map, for the case where possible msep sets are required.

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

    • SepsetsPossibleMsep

      public SepsetsPossibleMsep(Graph graph, IndependenceTest test, Knowledge knowledge, int depth, int maxPathLength)

      Constructor for SepsetsPossibleMsep.

      Parameters:
      graph - a Graph object
      test - a IndependenceTest object
      knowledge - a Knowledge object
      depth - a int
      maxPathLength - a int
  • Method Details

    • getSepset

      public Set<Node> getSepset(Node i, Node k)
      Retrieves the separation set (sepset) between two nodes.
      Specified by:
      getSepset in interface SepsetProducer
      Parameters:
      i - The first node
      k - The second node
      Returns:
      The set of nodes that form the sepset between node i and node k, or null if no sepset exists
    • getSepsetContaining

      public Set<Node> getSepsetContaining(Node i, Node k, Set<Node> s)
      Retrieves the separation set (sepset) between two nodes i and k that contains a given set of nodes s. 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 to be contained in the sepset
      Returns:
      The set of nodes that form the sepset between node i and node k and contains all nodes from set s, or null if no sepset exists
    • 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
    • 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
    • isIndependent

      public boolean isIndependent(Node d, Node c, Set<Node> sepset)

      isIndependent.

      Specified by:
      isIndependent in interface SepsetProducer
      Parameters:
      d - a Node object
      c - 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