Package edu.cmu.tetrad.search.test
Interface IndependenceTest
- All Known Implementing Classes:
IndTestChiSquare,IndTestConditionalCorrelation,IndTestConditionalGaussianLrt,IndTestCramerT,IndTestDegenerateGaussianLrt,IndTestDSep,IndTestFisherZ,IndTestFisherZConcatenateResiduals,IndTestFisherZFisherPValue,IndTestFisherZGeneralizedInverse,IndTestFisherZPercentIndependent,IndTestFisherZRecursive,IndTestGSquare,IndTestHsic,IndTestIndependenceFacts,IndTestMixedMultipleTTest,IndTestMnlrLr,IndTestMulti,IndTestMultinomialLogisticRegression,IndTestMultinomialLogisticRegressionWald,IndTestMvpLrt,IndTestPositiveCorr,IndTestProbabilistic,IndTestRegression,IndTestSepsetDci,IndTestTrekSep,Kci,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.
- Author:
- josephramsey
-
Method Summary
Modifier and TypeMethodDescriptiondefault IndependenceResultcheckIndependence(Node x, Node y, Node... z) Checks the independence fact in question and returns and independence result.checkIndependence(Node x, Node y, List<Node> z) default booleandetermines(List<Node> z, Node y) Returns true if y is determined the variable in z.default doublegetAlpha()Returns the significance level of the independence test.default ICovarianceMatrixgetCov()Returns the covariance matrix.getData()Returns the datasets for this testdefault intReturns the sample size.doublegetScore()Return A score that is higher with more likely models.default NodegetVariable(String name) Returns The variable by the given name.Returns the list of names for the variables in getNodesInEvidence.default IndependenceTestindTestSubset(List<Node> vars) Returns an Independence test for a sublist of the variables.booleanReturns true if the test prints verbose output.default voidsetAlpha(double alpha) Sets the significance level.voidsetVerbose(boolean verbose) Sets whether this test will print verbose output.toString()Returns a string representation of this test.
-
Method Details
-
checkIndependence
- Returns:
- an IndependenceResult (see).
- See Also:
-
getVariables
- Returns:
- the list of variables over which this independence checker is capable of determinining independence relations.
-
getData
DataModel getData()- Returns:
- The data model for the independence test, either a DataSet or a CovarianceMatrix.
- See Also:
-
getScore
double getScore()Return A score that is higher with more likely models.- Returns:
- This score.
-
setVerbose
void setVerbose(boolean verbose) Sets whether this test will print verbose output.- Parameters:
verbose- True if so.
-
isVerbose
boolean isVerbose()Returns true if the test prints verbose output.- Returns:
- True if the case.
-
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.
-
checkIndependence
Checks the independence fact in question and returns and independence result.- Returns:
- The independence result.
- See Also:
-
getSampleSize
default int getSampleSize()Returns the sample size.- Returns:
- This size.
-
getVariable
Returns The variable by the given name.- Returns:
- This variables.
-
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.- Returns:
- True if so.
-
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 suppored for a particular test.
-
getDataSets
Returns the datasets for this test- Returns:
- these datasets.
- Throws:
javax.help.UnsupportedOperationException- If this method is not supported for a particular test.
-