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.boolean
determines
(List<Node> z, Node x1) Determines if a given Node is present in a List of Nodes.double
getAlpha()
getAlpha.getData()
getData.getNode.double
Needed 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.boolean
isVerbose.void
setAlpha
(double alpha) Sets the alpha level for the independence test.void
setVerbose
(boolean verbose) Sets the verbose flag.toString()
toString.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface edu.cmu.tetrad.search.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
- aSepsetMapDci
objectnodes
- aList
object
-
-
Method Details
-
indTestSubset
Determines independence between a subset of variables.- Specified by:
indTestSubset
in 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:
checkIndependence
in 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.- See Also:
-
getPValue
public double getPValue()Needed for IndependenceTest interface. P value is not meaningful here.- Returns:
- a double
-
getVariables
getVariables.
- Specified by:
getVariables
in 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
-
getAlpha
public double getAlpha()getAlpha.
- Specified by:
getAlpha
in interfaceIndependenceTest
- Returns:
- a double
-
setAlpha
public void setAlpha(double alpha) Sets the alpha level for the independence test.- Specified by:
setAlpha
in interfaceIndependenceTest
- Parameters:
alpha
- The alpha level to be set.
-
getVariable
Retrieves the variable with the specified name.- Specified by:
getVariable
in interfaceIndependenceTest
- Parameters:
name
- the name of the variable to retrieve- Returns:
- the variable with the specified name, or null if not found
-
getVariable
-
getNode
-
toString
-
getData
getData.
- Specified by:
getData
in interfaceIndependenceTest
- Returns:
- a
DataSet
object - See Also:
-
isVerbose
public boolean isVerbose()isVerbose.
- Specified by:
isVerbose
in interfaceIndependenceTest
- Returns:
- a boolean
-
setVerbose
public void setVerbose(boolean verbose) Sets the verbose flag.- Specified by:
setVerbose
in interfaceIndependenceTest
- Parameters:
verbose
- True if verbose mode is enabled, false otherwise.
-