Class IndTestIod
- All Implemented Interfaces:
IndependenceTest
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.
- Version:
- $Id: $Id
- 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 independence between two nodes given a set of nodes.booleandetermines(List<Node> z, Node x) Determines whether the variables in z determine x.doublegetAlpha()Returns the significance level of the independence test.getData()Retrieves the data model associated with this test.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) Retrieves a variable with the given name.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) Calculates the independence test for a subset of variables.booleanReturns true if the test is verbose.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.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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.- Parameters:
tests- aListobject
-
-
Method Details
-
indTestSubset
Calculates the independence test for a subset of variables.- Specified by:
indTestSubsetin interfaceIndependenceTest- Parameters:
vars- The sublist of variables.- Returns:
- The independence test result.
- Throws:
UnsupportedOperationException- if this method is not implemented.
-
checkIndependence
public IndependenceResult checkIndependence(Node x, Node y, Set<Node> z) throws InterruptedException Checks the independence between two nodes given a set of nodes.- Specified by:
checkIndependencein interfaceIndependenceTest- Parameters:
x- The first node.y- The second node.z- The set of nodes.- Returns:
- The result of the independence test.
- Throws:
InterruptedException- If the process is interrupted during the execution.
-
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:
getVariablesin interfaceIndependenceTest- Returns:
- This list.
-
determines
Determines whether the variables in z determine x.- Parameters:
z- The list of nodes to search.x- The node to check for containment.- Returns:
- True if the node is contained in the list, false otherwise.
-
getAlpha
public double getAlpha()Description copied from interface:IndependenceTestReturns the significance level of the independence test.- Specified by:
getAlphain interfaceIndependenceTest- Returns:
- This level.
- Throws:
UnsupportedOperationException- since the method is not implemented.
-
setAlpha
public void setAlpha(double alpha) Description copied from interface:IndependenceTestSets the significance level.- Specified by:
setAlphain interfaceIndependenceTest- Parameters:
alpha- This level.- Throws:
UnsupportedOperationException- since the method is not implemented.
-
getVariable
Retrieves a variable with the given name.- Specified by:
getVariablein interfaceIndependenceTest- Parameters:
name- the name of the variable- Returns:
- the variable with the given name
- Throws:
IllegalArgumentException- if the variable is not found
-
getVariable
Returns the variable associated with the given node in the graph.- Parameters:
node- aNodeobject- Returns:
- This variable.
-
getNode
Return the node associated with the given variable in the graph.- Parameters:
variable- aNodeobject- Returns:
- This node.
-
toString
Returns a string representation of this test.- Specified by:
toStringin interfaceIndependenceTest- Overrides:
toStringin classObject- Returns:
- This string.
-
getData
Description copied from interface:IndependenceTestRetrieves the data model associated with this test.- Specified by:
getDatain interfaceIndependenceTest- Returns:
- A
DataModelobject representing the data model. - Throws:
UnsupportedOperationException- since the method is not implemented.
-
isVerbose
public boolean isVerbose()Returns true if the test is verbose.- Specified by:
isVerbosein interfaceIndependenceTest- Returns:
- True, if so.
-
setVerbose
public void setVerbose(boolean verbose) Sets whether this test will print verbose output.- Specified by:
setVerbosein interfaceIndependenceTest- Parameters:
verbose- True, if so.
-