Package edu.cmu.tetrad.search
Class IndTestSepset
java.lang.Object
edu.cmu.tetrad.search.IndTestSepset
- All Implemented Interfaces:
IndependenceTest
Checks independence facts for variables associated associated with a sepset by simply querying the sepset
- Author:
- Robert Tillman
-
Constructor Summary
ConstructorsConstructorDescriptionIndTestSepset
(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, List<Node> z) Checks the indicated independence fact.boolean
determines
(List<Node> z, Node x1) double
getAlpha()
getCov()
getData()
double
Needed for IndependenceTest interface.int
double
getScore()
A score that is higher with more likely models.getVariable
(Node node) getVariable
(String name) indTestSubset
(List<Node> vars) Required by IndependenceTest.boolean
void
setAlpha
(double alpha) Sets the significance level.void
setVerbose
(boolean verbose) toString()
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
-
Constructor Details
-
IndTestSepset
Constructs a new independence test that returns d-separation facts for the given graph as independence results.
-
-
Method Details
-
indTestSubset
Required by IndependenceTest.- Specified by:
indTestSubset
in interfaceIndependenceTest
- Returns:
- an Independence test for a subset of the variables.
-
checkIndependence
Checks the indicated independence fact.- 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
-
getPValue
public double getPValue()Needed for IndependenceTest interface. P value is not meaningful here. -
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.
-
getVariableNames
- Specified by:
getVariableNames
in interfaceIndependenceTest
- Returns:
- the list of variable varNames.
-
determines
- Specified by:
determines
in interfaceIndependenceTest
- Returns:
- true if y is determined the variable in z.
-
getAlpha
public double getAlpha()- Specified by:
getAlpha
in interfaceIndependenceTest
- Returns:
- the significance level of the independence test.
-
setAlpha
public void setAlpha(double alpha) Description copied from interface:IndependenceTest
Sets the significance level.- Specified by:
setAlpha
in interfaceIndependenceTest
-
getVariable
- Specified by:
getVariable
in interfaceIndependenceTest
- Returns:
- the variable by the given name.
-
getVariable
- Returns:
- the variable associated with the given node in the graph.
-
getNode
- Returns:
- the node associated with the given variable in the graph.
-
toString
- Specified by:
toString
in interfaceIndependenceTest
- Overrides:
toString
in classObject
-
getData
- Specified by:
getData
in interfaceIndependenceTest
- Returns:
- The data model for the independence test.
-
getCov
- Specified by:
getCov
in interfaceIndependenceTest
-
getDataSets
- Specified by:
getDataSets
in interfaceIndependenceTest
-
getSampleSize
public int getSampleSize()- Specified by:
getSampleSize
in interfaceIndependenceTest
-
getCovMatrices
- Specified by:
getCovMatrices
in interfaceIndependenceTest
-
getScore
public double getScore()Description copied from interface:IndependenceTest
A score that is higher with more likely models.- Specified by:
getScore
in interfaceIndependenceTest
-
isVerbose
public boolean isVerbose()- Specified by:
isVerbose
in interfaceIndependenceTest
-
setVerbose
public void setVerbose(boolean verbose) - Specified by:
setVerbose
in interfaceIndependenceTest
-