Package edu.cmu.tetrad.search.test
Class IndTestIndependenceFacts
java.lang.Object
edu.cmu.tetrad.search.test.IndTestIndependenceFacts
- All Implemented Interfaces:
IndependenceTest
Checks conditional independence against a list of conditional independence facts, manually entered.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckIndependence(Node x, Node y, Set<Node> __z) Checks independence by looking up facts in the list of facts supplied in the constructor.booleandetermines(List<Node> z, Node y) Determines if the given list of nodes (z) determines the specified node (y).doublegetAlpha()Returns the alpha value used for checking independence.getData()Returns the facts supplied in the constructor, which constutite a data model.doubleNo p-values are available.getVariable(String name) Retrieves a variable node based on its name.Returns the list of variables for the facts.indTestSubset(List<Node> vars) Returns anIndependenceTestobject for a sublist of variables.booleanReturns whether verbose output is to be printed.voidsetAlpha(double alpha) Sets the alpha value used for checking independence.voidsetVerbose(boolean verbose) Sets whether verbose output is to be printed.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.IndependenceTest
checkIndependence, determines, getCov, getDataSets, getSampleSize, getVariableNames, toString
-
Constructor Details
-
IndTestIndependenceFacts
Constructor.- Parameters:
facts- The facts to check.- See Also:
-
-
Method Details
-
indTestSubset
Returns anIndependenceTestobject for a sublist of variables.- Specified by:
indTestSubsetin interfaceIndependenceTest- Parameters:
vars- The sublist of variables.- Returns:
- The IndependenceTest object for the given sublist of variables.
-
checkIndependence
Checks independence by looking up facts in the list of facts supplied in the constructor.- Specified by:
checkIndependencein interfaceIndependenceTest- Parameters:
x- aNodeobjecty- aNodeobject__z- aSetobject- Returns:
- a
IndependenceResultobject - See Also:
-
getPValue
public double getPValue()No p-values are available.- Returns:
- Double.NaN.
-
getVariables
Returns the list of variables for the facts.- Specified by:
getVariablesin interfaceIndependenceTest- Returns:
- This list.
-
getVariable
Retrieves a variable node based on its name.- Specified by:
getVariablein interfaceIndependenceTest- Parameters:
name- The name of the variable.- Returns:
- The variable node with the specified name, or null if not found.
- Throws:
NullPointerException- If the name is null.
-
determines
Determines if the given list of nodes (z) determines the specified node (y).- Parameters:
z- The list of nodes to check for determination.y- The node to check if it is determined.- Returns:
- True if the list of nodes (z) determines the node (y), false otherwise.
-
getAlpha
public double getAlpha()Returns the alpha value used for checking independence.- Specified by:
getAlphain interfaceIndependenceTest- Returns:
- The alpha value.
-
setAlpha
public void setAlpha(double alpha) Sets the alpha value used for checking independence.- Specified by:
setAlphain interfaceIndependenceTest- Parameters:
alpha- The alpha value.
-
getData
Returns the facts supplied in the constructor, which constutite a data model.- Specified by:
getDatain interfaceIndependenceTest- Returns:
- These facts.
- See Also:
-
isVerbose
public boolean isVerbose()Returns whether verbose output is to be printed.- Specified by:
isVerbosein interfaceIndependenceTest- Returns:
- True, if so.
-
setVerbose
public void setVerbose(boolean verbose) Sets whether verbose output is to be printed.- Specified by:
setVerbosein interfaceIndependenceTest- Parameters:
verbose- True if verbose output should be printed, false otherwise.
-