Class IndTestMulti

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

public final class IndTestMulti extends Object implements IndependenceTest
A class that represents a pooled independence test for multiple data sets.
  • Constructor Details

    • IndTestMulti

      public IndTestMulti(List<IndependenceTest> independenceTests, ResolveSepsets.Method method)
      Constructs a new pooled independence test for the given data sets.
      Parameters:
      independenceTests - the independence tests to pool.
      method - the method to use for pooling.
      See Also:
  • Method Details

    • indTestSubset

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

      public IndependenceResult checkIndependence(Node x, Node y, Set<Node> z) throws InterruptedException
      Determines whether variable x is independent of variable y given a list of conditioning variables z.
      Specified by:
      checkIndependence in interface IndependenceTest
      Parameters:
      x - a Node object
      y - a Node object
      z - a Set object
      Returns:
      a IndependenceResult object
      Throws:
      InterruptedException - If the process is interrupted during the execution.
    • getAlpha

      public double getAlpha()
      Returns the alpha of the component tests (they are required to agree; the first is reported).
      Specified by:
      getAlpha in interface IndependenceTest
      Returns:
      the alpha level.
    • setAlpha

      public void setAlpha(double alpha)
      Sets the alpha level on every component test and clears the cache.
      Specified by:
      setAlpha in interface IndependenceTest
      Parameters:
      alpha - the alpha level.
    • getVariables

      public List<Node> getVariables()
      Description copied from interface: IndependenceTest
      Retrieves the list of variables associated with this independence test.
      Specified by:
      getVariables in interface IndependenceTest
      Returns:
      A list of Node objects representing the variables.
    • determines

      public boolean determines(List<Node> z, Node x) throws UnsupportedOperationException
      Determines whether variable x is independent of variable y given a list of conditioning variables z.
      Parameters:
      z - A list of conditioning variables.
      x - The variable x.
      Returns:
      True if variable x is independent of variable y given the conditioning variables z, false otherwise.
      Throws:
      UnsupportedOperationException - if the method is not implemented.
    • getData

      public DataModel getData()
      Returns the data of the first component test; the pooled test has no single data set.
      Specified by:
      getData in interface IndependenceTest
      Returns:
      the first component test's data.
    • getIndependenceTests

      public List<IndependenceTest> getIndependenceTests()
      Retrieves the list of independence tests managed by this instance. The returned list is unmodifiable to ensure the integrity of the underlying data.
      Returns:
      an unmodifiable list of IndependenceTest objects.
    • toString

      public String toString()
      Description copied from interface: IndependenceTest
      Returns a string representation of this test.
      Specified by:
      toString in interface IndependenceTest
      Overrides:
      toString in class Object
      Returns:
      This string.
    • isVerbose

      public boolean isVerbose()
      Returns true if the test prints verbose output.
      Specified by:
      isVerbose in interface IndependenceTest
      Returns:
      True if the test prints verbose output, false otherwise.
    • setVerbose

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