Class ProbabilisticMapIndependence
java.lang.Object
edu.cmu.tetrad.search.work_in_progress.ProbabilisticMapIndependence
- All Implemented Interfaces:
IndependenceTest
Uses BCInference by Cooper and Bui to calculate probabilistic conditional independence judgments.
- Version:
- $Id: $Id
- Author:
- josephramsey 3/2014
-
Constructor Summary
ConstructorsConstructorDescriptionProbabilisticMapIndependence(DataSet dataSet) Initializes the test using a discrete data sets. -
Method Summary
Modifier and TypeMethodDescriptioncheckIndependence(Node x, Node y, Node... z) Checks the independence fact in question and returns and independence result.checkIndependence(Node x, Node y, Set<Node> _z) Checks the independence between two variables x and y given a conditioning set z.booleandetermines(Set<Node> z, Node y) Returns true if y is determined the variable in z.doublegetAlpha()Returns the significance level of the independence test.getData()Retrieves the data model associated with this test.getH()getH.doubleGetter for the fieldposterior.getVariable(String name) Returns The variable by the given name.Retrieves the list of variables associated with this independence test.indTestSubset(List<Node> vars) Returns an Independence test for a sublist of the variables.booleanReturns true if the test prints verbose output.doubleprobConstraint(BCInference.OP op, Node x, Node y, Node[] z) probConstraint.voidsetAlpha(double alpha) Sets the significance level.voidsetVerbose(boolean verbose) Sets whether this test will print verbose output.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.test.IndependenceTest
getCov, getDataSets, getSampleSize, getVariableNames, toString
-
Constructor Details
-
ProbabilisticMapIndependence
Initializes the test using a discrete data sets.- Parameters:
dataSet- aDataSetobject
-
-
Method Details
-
indTestSubset
Returns an Independence test for a sublist of the variables.- Specified by:
indTestSubsetin interfaceIndependenceTest- Parameters:
vars- The sublist of variables.- Returns:
- a
IndependenceTestobject
-
checkIndependence
Checks the independence between two variables x and y given a conditioning set z.- Specified by:
checkIndependencein interfaceIndependenceTest- Parameters:
x- The first variable to test, represented as a Node object.y- The second variable to test, represented as a Node object._z- The set of conditioning variables, represented as a Set of Node objects.- Returns:
- An IndependenceResult object representing the outcome of the independence test.
-
checkIndependence
Checks the independence fact in question and returns and independence result.- Specified by:
checkIndependencein interfaceIndependenceTest- Parameters:
x- aNodeobjecty- aNodeobjectz- aNodeobject- Returns:
- The independence result.
- See Also:
-
probConstraint
probConstraint.
- Parameters:
op- aBCInference.OPobjectx- aNodeobjecty- aNodeobjectz- an array ofNodeobjects- Returns:
- a double
-
getVariables
Retrieves the list of variables associated with this independence test.- Specified by:
getVariablesin interfaceIndependenceTest- Returns:
- A list of
Nodeobjects representing the variables.
-
getVariable
Returns The variable by the given name.- Specified by:
getVariablein interfaceIndependenceTest- Parameters:
name- aStringobject- Returns:
- This variable.
-
determines
Returns true if y is determined the variable in z.- Specified by:
determinesin interfaceIndependenceTest- Parameters:
z- aSetobjecty- aNodeobject- Returns:
- True, if so.
-
getAlpha
public double getAlpha()Returns the significance level of the independence test.- Specified by:
getAlphain interfaceIndependenceTest- Returns:
- This level.
-
setAlpha
public void setAlpha(double alpha) Sets the significance level.- Specified by:
setAlphain interfaceIndependenceTest- Parameters:
alpha- This level.
-
getData
Retrieves the data model associated with this test.- Specified by:
getDatain interfaceIndependenceTest- Returns:
- A
DataModelobject representing the data model.
-
getH
getH.
- Returns:
- a
Mapobject
-
getPosterior
public double getPosterior()Getter for the field
posterior.- Returns:
- a double
-
isVerbose
public boolean isVerbose()Returns true if the test prints verbose output.- Specified by:
isVerbosein interfaceIndependenceTest- Returns:
- True if the case.
-
setVerbose
public void setVerbose(boolean verbose) Sets whether this test will print verbose output.- Specified by:
setVerbosein interfaceIndependenceTest- Parameters:
verbose- True, if so.
-