Class IndTestIod
- All Implemented Interfaces:
IndependenceTest
Checks independence result by listing all tests with those variables, testing each one, and returning the resolution of these test results. The reference is here:
Tillman, R., & Spirtes, P. (2011, June). Learning equivalence classes of acyclic models with latent and selection variables from multiple datasets with overlapping variables. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics (pp. 3-15). JMLR Workshop and Conference Proceedings.
The idea of this implementation is that one initializes this test with multiple independence tests (for multiple datasets), then a call to the independence check method for X _||_ Y | Z list the independence tests from among these, calls each and gets a p-value, then uses a resolution method (such as Fisher's) to resolve these p-values.
Based on work by Rob Tillman, Peter Spirtes, and referencing earlier work by David Danks.
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionIndTestIod
(List<IndependenceTest> tests) Constructs a new pooled independence test from the given list of independence tests. -
Method Summary
Modifier and TypeMethodDescriptioncheckIndependence
(Node x, Node y, Set<Node> z) Checks the indicated independence fact by pooling available tests for the given variables.boolean
determines
(List<Node> z, Node x) Returns true if z contains x.double
getAlpha()
Returns the alpha level for this test.getData()
The data set for this test is undefined, since the test is pooled over multiple datasets.Return the node associated with the given variable in the graph.getVariable
(Node node) Returns the variable associated with the given node in the graph.getVariable
(String name) Returns the variable associated with the given name in the graph.Returns the list of TetradNodes over which this independence checker is capable of determining independence relations-- that is, all the variables in the given graph or the given data set.indTestSubset
(List<Node> vars) Returns an Independence test for a sublist of the variables.boolean
Returns true if the test is verbose.void
setAlpha
(double alpha) Sets the alpha level for this test.void
setVerbose
(boolean verbose) Sets the test to verbose or not.toString()
Returns a string representation of this test.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface edu.cmu.tetrad.search.IndependenceTest
checkIndependence, determines, getCov, getDataSets, getSampleSize, getVariableNames
-
Constructor Details
-
IndTestIod
Constructs a new pooled independence test from the given list of independence tests.
-
-
Method Details
-
indTestSubset
Description copied from interface:IndependenceTest
Returns an Independence test for a sublist of the variables.- Specified by:
indTestSubset
in interfaceIndependenceTest
- Parameters:
vars
- The sublist of variables.- Throws:
javax.help.UnsupportedOperationException
- Since the method is not implemented.
-
checkIndependence
Checks the indicated independence fact by pooling available tests for the given variables.- Specified by:
checkIndependence
in interfaceIndependenceTest
- Parameters:
x
- one node.y
- a second node.z
- a List of nodes (conditioning variables)- Returns:
- True iff x _||_ y | z
- See Also:
-
getVariables
Returns the list of TetradNodes over which this independence checker is capable of determining independence relations-- that is, all the variables in the given graph or the given data set.- Specified by:
getVariables
in interfaceIndependenceTest
- Returns:
- This list.
-
determines
Returns true if z contains x.- Parameters:
z
- A list of nodes.x
- The target node.- Returns:
- True if z contains x.
-
getAlpha
public double getAlpha()Returns the alpha level for this test.- Specified by:
getAlpha
in interfaceIndependenceTest
- Returns:
- This level.
-
setAlpha
public void setAlpha(double alpha) Sets the alpha level for this test.- Specified by:
setAlpha
in interfaceIndependenceTest
- Parameters:
alpha
- This level.
-
getVariable
Returns the variable associated with the given name in the graph.- Specified by:
getVariable
in interfaceIndependenceTest
- Parameters:
name
- The name of the variable.- Returns:
- This variable.
-
getVariable
Returns the variable associated with the given node in the graph.- Returns:
- This variable.
-
getNode
Return the node associated with the given variable in the graph.- Returns:
- This node.
-
toString
Returns a string representation of this test.- Specified by:
toString
in interfaceIndependenceTest
- Overrides:
toString
in classObject
- Returns:
- This string.
-
getData
The data set for this test is undefined, since the test is pooled over multiple datasets.- Specified by:
getData
in interfaceIndependenceTest
- Returns:
- null.
- See Also:
-
isVerbose
public boolean isVerbose()Returns true if the test is verbose.- Specified by:
isVerbose
in interfaceIndependenceTest
- Returns:
- True, if so.
-
setVerbose
public void setVerbose(boolean verbose) Sets the test to verbose or not.- Specified by:
setVerbose
in interfaceIndependenceTest
- Parameters:
verbose
- True, if so.
-