Class IndTestSepsetDci
java.lang.Object
edu.cmu.tetrad.search.work_in_progress.IndTestSepsetDci
- All Implemented Interfaces:
IndependenceTest
Checks independence facts for variables associated with a sepset by simply querying the sepset
- Version:
- $Id: $Id
- Author:
- Robert Tillman
-
Constructor Summary
ConstructorsConstructorDescriptionIndTestSepsetDci(SepsetMapDci sepset, List<Node> nodes) Constructs a new independence test that returns d-separation facts for the given graph as independence results. -
Method Summary
Modifier and TypeMethodDescriptioncheckIndependence(Node x, Node y, Set<Node> z) Checks the independence between two nodes, given a set of conditioning nodes.booleandetermines(List<Node> z, Node x1) Determines if a given Node is present in a List of Nodes.doublegetAlpha()getAlpha.getData()getData.getNode.doubleNeeded for IndependenceTest interface.getVariable(Node node) getVariable.getVariable(String name) Retrieves the variable with the specified name.getVariables.indTestSubset(List<Node> vars) Determines independence between a subset of variables.booleanisVerbose.voidsetAlpha(double alpha) Sets the alpha level for the independence test.voidsetVerbose(boolean verbose) Sets the verbose flag.toString()toString.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.test.IndependenceTest
checkIndependence, determines, getCov, getDataSets, getSampleSize, getVariableNames
-
Constructor Details
-
IndTestSepsetDci
Constructs a new independence test that returns d-separation facts for the given graph as independence results.- Parameters:
sepset- aSepsetMapDciobjectnodes- aListobject
-
-
Method Details
-
indTestSubset
Determines independence between a subset of variables.- Specified by:
indTestSubsetin interfaceIndependenceTest- Parameters:
vars- The sublist of variables.- Returns:
- This IndependenceTest object.
- Throws:
IllegalArgumentException- If the subset is empty or contains variables that are not original variables.
-
checkIndependence
Checks the independence between two nodes, given a set of conditioning nodes.- Specified by:
checkIndependencein interfaceIndependenceTest- Parameters:
x- A Node object representing the first node.y- A Node object representing the second node.z- A set representing the set of conditioning nodes.- Returns:
- An IndependenceResult object containing the result of the independence test.
- Throws:
NullPointerException- if z is null or if any node in z is null.RuntimeException- if the p-value is undefined.
-
getPValue
public double getPValue()Needed for IndependenceTest interface. P value is not meaningful here.- Returns:
- a double
-
getVariables
getVariables.
- Specified by:
getVariablesin interfaceIndependenceTest- Returns:
- the list of TetradNodes over which this independence checker is capable of determinine independence relations-- that is, all the variables in the given graph or the given data set.
-
determines
Determines if a given Node is present in a List of Nodes.- Parameters:
z- The List of Nodes to search in.x1- The Node to search for.- Returns:
- True if the Node x1 is present in the List z, otherwise False.
-
getAlpha
public double getAlpha()getAlpha.
- Specified by:
getAlphain interfaceIndependenceTest- Returns:
- a double
-
setAlpha
public void setAlpha(double alpha) Sets the alpha level for the independence test.- Specified by:
setAlphain interfaceIndependenceTest- Parameters:
alpha- The alpha level to be set.
-
getVariable
Retrieves the variable with the specified name.- Specified by:
getVariablein interfaceIndependenceTest- Parameters:
name- the name of the variable to retrieve- Returns:
- the variable with the specified name, or null if not found
-
getVariable
getVariable.
- Parameters:
node- aNodeobject- Returns:
- the variable associated with the given node in the graph.
-
getNode
getNode.
- Parameters:
variable- aNodeobject- Returns:
- the node associated with the given variable in the graph.
-
toString
toString.
- Specified by:
toStringin interfaceIndependenceTest- Overrides:
toStringin classObject- Returns:
- a
Stringobject
-
getData
getData.
- Specified by:
getDatain interfaceIndependenceTest- Returns:
- a
DataSetobject
-
isVerbose
public boolean isVerbose()isVerbose.
- Specified by:
isVerbosein interfaceIndependenceTest- Returns:
- a boolean
-
setVerbose
public void setVerbose(boolean verbose) Sets the verbose flag.- Specified by:
setVerbosein interfaceIndependenceTest- Parameters:
verbose- True if verbose mode is enabled, false otherwise.
-