Class IndTestSepset

java.lang.Object
edu.cmu.tetrad.search.IndTestSepset
All Implemented Interfaces:
IndependenceTest

public class IndTestSepset extends Object implements IndependenceTest
Checks independence facts for variables associated associated with a sepset by simply querying the sepset
Author:
Robert Tillman
  • Constructor Details

    • IndTestSepset

      public IndTestSepset(SepsetMapDci sepset, List<Node> nodes)
      Constructs a new independence test that returns d-separation facts for the given graph as independence results.
  • Method Details

    • indTestSubset

      public IndependenceTest indTestSubset(List<Node> vars)
      Required by IndependenceTest.
      Specified by:
      indTestSubset in interface IndependenceTest
      Returns:
      an Independence test for a subset of the variables.
    • checkIndependence

      public IndependenceResult checkIndependence(Node x, Node y, List<Node> z)
      Checks the indicated independence fact.
      Specified by:
      checkIndependence in interface IndependenceTest
      Parameters:
      x - one node.
      y - a second node.
      z - a List of nodes (conditioning variables)
      Returns:
      true iff x _||_ y | z
      See Also:
    • getPValue

      public double getPValue()
      Needed for IndependenceTest interface. P value is not meaningful here.
    • getVariables

      public List<Node> getVariables()
      Specified by:
      getVariables in interface IndependenceTest
      Returns:
      the list of TetradNodes over which this independence checker is capable of determinine independence relations-- that is, all the variables in the given graph or the given data set.
    • determines

      public boolean determines(List<Node> z, Node x1)
      Specified by:
      determines in interface IndependenceTest
      Returns:
      true if y is determined the variable in z.
    • getAlpha

      public double getAlpha()
      Specified by:
      getAlpha in interface IndependenceTest
      Returns:
      the significance level of the independence test.
    • setAlpha

      public void setAlpha(double alpha)
      Description copied from interface: IndependenceTest
      Sets the significance level.
      Specified by:
      setAlpha in interface IndependenceTest
    • getVariable

      public Node getVariable(String name)
      Specified by:
      getVariable in interface IndependenceTest
      Returns:
      the variable by the given name.
    • getVariable

      public Node getVariable(Node node)
      Returns:
      the variable associated with the given node in the graph.
    • getNode

      public Node getNode(Node variable)
      Returns:
      the node associated with the given variable in the graph.
    • toString

      public String toString()
      Specified by:
      toString in interface IndependenceTest
      Overrides:
      toString in class Object
    • getData

      public DataSet getData()
      Specified by:
      getData in interface IndependenceTest
      Returns:
      The data model for the independence test.
    • getScore

      public double getScore()
      Description copied from interface: IndependenceTest
      A score that is higher with more likely models.
      Specified by:
      getScore in interface IndependenceTest
    • isVerbose

      public boolean isVerbose()
      Specified by:
      isVerbose in interface IndependenceTest
    • setVerbose

      public void setVerbose(boolean verbose)
      Specified by:
      setVerbose in interface IndependenceTest