Class IndTestIndependenceFacts

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

public final class IndTestIndependenceFacts extends Object implements IndependenceTest
Checks conditional independence against a list of conditional independence facts, manually entered.
Version:
$Id: $Id
Author:
josephramsey
  • Constructor Details

  • Method Details

    • indTestSubset

      public IndependenceTest indTestSubset(List<Node> vars)
      Returns an IndependenceTest object for a sublist of variables.
      Specified by:
      indTestSubset in interface IndependenceTest
      Parameters:
      vars - The sublist of variables.
      Returns:
      The IndependenceTest object for the given sublist of variables.
    • checkIndependence

      public IndependenceResult checkIndependence(Node x, Node y, Set<Node> __z)
      Checks independence by looking up facts in the list of facts supplied in the constructor.
      Specified by:
      checkIndependence in interface IndependenceTest
      Parameters:
      x - a Node object
      y - a Node object
      __z - a Set object
      Returns:
      a IndependenceResult object
      See Also:
    • getPValue

      public double getPValue()
      No p-values are available.
      Returns:
      Double.NaN.
    • getVariables

      public List<Node> getVariables()
      Returns the list of variables for the facts.
      Specified by:
      getVariables in interface IndependenceTest
      Returns:
      This list.
    • getVariable

      public Node getVariable(String name)
      Retrieves a variable node based on its name.
      Specified by:
      getVariable in interface IndependenceTest
      Parameters:
      name - The name of the variable.
      Returns:
      The variable node with the specified name, or null if not found.
      Throws:
      NullPointerException - If the name is null.
    • determines

      public boolean determines(List<Node> z, Node y)
      Determines if the given list of nodes (z) determines the specified node (y).
      Parameters:
      z - The list of nodes to check for determination.
      y - The node to check if it is determined.
      Returns:
      True if the list of nodes (z) determines the node (y), false otherwise.
    • getAlpha

      public double getAlpha()
      Returns the alpha value used for checking independence.
      Specified by:
      getAlpha in interface IndependenceTest
      Returns:
      The alpha value.
    • setAlpha

      public void setAlpha(double alpha)
      Sets the alpha value used for checking independence.
      Specified by:
      setAlpha in interface IndependenceTest
      Parameters:
      alpha - The alpha value.
    • getData

      public DataModel getData()
      Returns the facts supplied in the constructor, which constutite a data model.
      Specified by:
      getData in interface IndependenceTest
      Returns:
      These facts.
      See Also:
    • isVerbose

      public boolean isVerbose()
      Returns whether verbose output is to be printed.
      Specified by:
      isVerbose in interface IndependenceTest
      Returns:
      True, if so.
    • setVerbose

      public void setVerbose(boolean verbose)
      Sets whether verbose output is to be printed.
      Specified by:
      setVerbose in interface IndependenceTest
      Parameters:
      verbose - True if verbose output should be printed, false otherwise.