Package edu.cmu.tetrad.search
Interface IndependenceTest
- All Known Implementing Classes:
CompositeIndependenceTest
,IndTestBasisFunctionLrt
,IndTestBasisFunctionLrtFullSample
,IndTestChiSquare
,IndTestConditionalCorrelation
,IndTestConditionalGaussianLrt
,IndTestCramerT
,IndTestDegenerateGaussianLrt
,IndTestDegenerateGaussianLrtFullSample
,IndTestFisherZ
,IndTestFisherZConcatenateResiduals
,IndTestFisherZFisherPValue
,IndTestFisherZPercentIndependent
,IndTestFisherZRecursive
,IndTestGSquare
,IndTestHsic
,IndTestIndependenceFacts
,IndTestIod
,IndTestMixedMultipleTTest
,IndTestMulti
,IndTestMultinomialLogisticRegression
,IndTestMultinomialLogisticRegressionWald
,IndTestMvpLrt
,IndTestPositiveCorr
,IndTestProbabilistic
,IndTestRegression
,IndTestSepsetDci
,IndTestTrekSep
,Kci
,MsepTest
,ProbabilisticMapIndependence
,ScoreIndTest
public interface IndependenceTest
Gives an interface that can be implemented by classes that do conditional independence testing. These classes are
capable of serving as conditional independence "oracles" for constraint-based searches. Many methods are given
defaults so that such a test will be easy to implement in Python using JPype.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Method Summary
Modifier and TypeMethodDescriptiondefault IndependenceResult
checkIndependence
(Node x, Node y, Node... z) Checks the independence fact in question and returns and independence result.checkIndependence
(Node x, Node y, Set<Node> z) Checks the independence between two variables x and y given a conditioning set z.default boolean
determines
(Set<Node> z, Node y) Returns true if y is determined the variable in z.default double
getAlpha()
Returns the significance level of the independence test.default ICovarianceMatrix
getCov()
Returns the covariance matrix.getData()
Retrieves the data model associated with this test.Returns the datasets for this testdefault int
Returns the sample size.default Node
getVariable
(String name) Returns The variable by the given name.Returns the list of names for the variables in getNodesInEvidence.Retrieves the list of variables associated with this independence test.default IndependenceTest
indTestSubset
(List<Node> vars) Returns an Independence test for a sublist of the variables.boolean
Returns true if the test prints verbose output.default void
setAlpha
(double alpha) Sets the significance level.void
setVerbose
(boolean verbose) Sets whether this test will print verbose output.toString()
Returns a string representation of this test.
-
Method Details
-
checkIndependence
Checks the independence between two variables x and y given a conditioning set z.- Parameters:
x
- The first variable to test, represented as a Node object.y
- The second variable to test, represented as a Node object.z
- The set of conditioning variables, represented as a Set of Node objects.- Returns:
- An IndependenceResult object representing the outcome of the independence test.
- Throws:
InterruptedException
- If the process is interrupted during the execution.
-
getVariables
Retrieves the list of variables associated with this independence test.- Returns:
- A list of
Node
objects representing the variables.
-
getData
DataModel getData()Retrieves the data model associated with this test.- Returns:
- A
DataModel
object representing the data model.
-
isVerbose
boolean isVerbose()Returns true if the test prints verbose output.- Returns:
- True if the case.
-
setVerbose
void setVerbose(boolean verbose) Sets whether this test will print verbose output.- Parameters:
verbose
- True, if so.
-
toString
String toString()Returns a string representation of this test. -
indTestSubset
Returns an Independence test for a sublist of the variables.- Parameters:
vars
- The sublist of variables.- Returns:
- a
IndependenceTest
object
-
checkIndependence
Checks the independence fact in question and returns and independence result.- Parameters:
x
- aNode
objecty
- aNode
objectz
- aNode
object- Returns:
- The independence result.
- Throws:
InterruptedException
- if any.- See Also:
-
getSampleSize
default int getSampleSize()Returns the sample size.- Returns:
- This size.
-
getVariable
Returns The variable by the given name.- Parameters:
name
- aString
object- Returns:
- This variable.
-
getVariableNames
Returns the list of names for the variables in getNodesInEvidence.- Returns:
- this list.
-
determines
Returns true if y is determined the variable in z. -
getAlpha
default double getAlpha()Returns the significance level of the independence test.- Returns:
- This level.
- Throws:
UnsupportedOperationException
- if there is no significance level.
-
setAlpha
default void setAlpha(double alpha) Sets the significance level.- Parameters:
alpha
- This level.
-
getCov
Returns the covariance matrix.- Returns:
- This matrix.
- Throws:
UnsupportedOperationException
- If this method is not supported for a particular test.
-
getDataSets
Returns the datasets for this test- Returns:
- these datasets.
- Throws:
UnsupportedOperationException
- If this method is not supported for a particular test.
-