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.booleandetermines(List<Node> z, Node x1) doublegetAlpha()getCov()getData()getFacts()getGraph()doubleNeeded for IndependenceTest interface.intdoublegetScore()A score that is higher with more likely models.getVariable(String name) indTestSubset(List<Node> vars) Required by IndependenceTest.booleanisDSeparated(Node x, Node y, List<Node> z) Auxiliary method to calculate dseparation facts directly from nodes instead of from variables.booleanvoidsetAlpha(double alpha) Sets the significance level.voidvoidsetVerbose(boolean verbose) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
indTestSubsetin interfaceIndependenceTest- Returns:
- an Independence test for a subset of the variables.
-
checkIndependence
Checks the indicated d-separation fact.- Specified by:
checkIndependencein 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:
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.
-
getVariableNames
- Specified by:
getVariableNamesin interfaceIndependenceTest- Returns:
- the list of variable varNames.
-
determines
- Specified by:
determinesin interfaceIndependenceTest- Returns:
- true if y is determined the variable in z.
-
getAlpha
public double getAlpha()- Specified by:
getAlphain interfaceIndependenceTest- Returns:
- the significance level of the independence test.
-
setAlpha
public void setAlpha(double alpha) Description copied from interface:IndependenceTestSets the significance level.- Specified by:
setAlphain interfaceIndependenceTest
-
getVariable
- Specified by:
getVariablein interfaceIndependenceTest- Returns:
- the variable by the given name.
-
getGraph
- Returns:
- the underlying graph.
-
setGraph
-
toString
- Specified by:
toStringin interfaceIndependenceTest- Overrides:
toStringin classObject
-
getData
- Specified by:
getDatain interfaceIndependenceTest- Returns:
- The data model for the independence test.
-
getCov
- Specified by:
getCovin interfaceIndependenceTest
-
getDataSets
- Specified by:
getDataSetsin interfaceIndependenceTest
-
getSampleSize
public int getSampleSize()- Specified by:
getSampleSizein interfaceIndependenceTest
-
getCovMatrices
- Specified by:
getCovMatricesin interfaceIndependenceTest
-
getScore
public double getScore()Description copied from interface:IndependenceTestA score that is higher with more likely models.- Specified by:
getScorein interfaceIndependenceTest
-
getFacts
-
isVerbose
public boolean isVerbose()- Specified by:
isVerbosein interfaceIndependenceTest
-
setVerbose
public void setVerbose(boolean verbose) - Specified by:
setVerbosein interfaceIndependenceTest
-