Package edu.cmu.tetrad.search
Class IndTestDSep
java.lang.Object
edu.cmu.tetrad.search.IndTestDSep
- All Implemented Interfaces:
IndependenceTest
Checks independence facts for variables associated with the nodes in a given graph by checking d-separation facts on
the underlying nodes.
- Author:
- Joseph Ramsey
-
Constructor Summary
ConstructorsConstructorDescriptionIndTestDSep
(IndependenceFacts facts) IndTestDSep
(IndependenceFacts facts, boolean keepLatents) IndTestDSep
(IndependenceFacts facts, List<Node> variables) IndTestDSep
(Graph graph) IndTestDSep
(Graph graph, boolean keepLatents) 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 d-separation fact.boolean
determines
(List<Node> z, Node x1) double
getAlpha()
getCov()
getData()
getFacts()
getGraph()
double
Needed for IndependenceTest interface.int
double
getScore()
A score that is higher with more likely models.getVariable
(String name) indTestSubset
(List<Node> vars) Required by IndependenceTest.boolean
isDSeparated
(Node x, Node y, List<Node> z) Auxiliary method to calculate dseparation facts directly from nodes instead of from variables.boolean
void
setAlpha
(double alpha) Sets the significance level.void
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
-
IndTestDSep
-
IndTestDSep
-
IndTestDSep
-
IndTestDSep
Constructs a new independence test that returns d-separation facts for the given graph as independence results. -
IndTestDSep
-
-
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 d-separation 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
-
isDSeparated
Auxiliary method to calculate dseparation facts directly from nodes instead of from variables. -
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.
-
getGraph
- Returns:
- the underlying graph.
-
setGraph
-
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
-
getFacts
-
isVerbose
public boolean isVerbose()- Specified by:
isVerbose
in interfaceIndependenceTest
-
setVerbose
public void setVerbose(boolean verbose) - Specified by:
setVerbose
in interfaceIndependenceTest
-