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) checkIndependence.boolean
determines
(Set<Node> z, Node y) Returns true if y is determined the variable in z.double
getAlpha()
Returns the significance level of the independence test.getData()
getData.getH()
getH.double
Getter for the fieldposterior
.getVariable
(String name) Returns The variable by the given name.getVariables.indTestSubset
(List<Node> vars) Returns an Independence test for a sublist of the variables.boolean
Returns true if the test prints verbose output.double
probConstraint
(BCInference.OP op, Node x, Node y, Node[] z) probConstraint.void
setAlpha
(double alpha) Sets the significance level.void
setVerbose
(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, wait
Methods inherited from interface edu.cmu.tetrad.search.IndependenceTest
getCov, getDataSets, getSampleSize, getVariableNames, toString
-
Constructor Details
-
ProbabilisticMapIndependence
-
-
Method Details
-
indTestSubset
Returns an Independence test for a sublist of the variables.- Specified by:
indTestSubset
in interfaceIndependenceTest
- Parameters:
vars
- The sublist of variables.- Returns:
- a
IndependenceTest
object
-
checkIndependence
checkIndependence.
- Specified by:
checkIndependence
in interfaceIndependenceTest
- Parameters:
x
- aNode
objecty
- aNode
object_z
- aSet
object- Returns:
- an IndependenceResult (see).
- See Also:
-
checkIndependence
Checks the independence fact in question and returns and independence result.- Specified by:
checkIndependence
in interfaceIndependenceTest
- Parameters:
x
- aNode
objecty
- aNode
objectz
- aNode
object- Returns:
- The independence result.
- See Also:
-
probConstraint
probConstraint.
- Parameters:
op
- aBCInference.OP
objectx
- aNode
objecty
- aNode
objectz
- an array ofNode
objects- Returns:
- a double
-
getVariables
getVariables.
- Specified by:
getVariables
in interfaceIndependenceTest
- Returns:
- the list of variables over which this independence checker is capable of determining independence relations.
-
getVariable
Returns The variable by the given name.- Specified by:
getVariable
in interfaceIndependenceTest
- Parameters:
name
- aString
object- Returns:
- This variable.
-
determines
Returns true if y is determined the variable in z.- Specified by:
determines
in interfaceIndependenceTest
- Parameters:
z
- aSet
objecty
- aNode
object- Returns:
- True, if so.
-
getAlpha
public double getAlpha()Returns the significance level of the independence test.- Specified by:
getAlpha
in interfaceIndependenceTest
- Returns:
- This level.
-
setAlpha
public void setAlpha(double alpha) Sets the significance level.- Specified by:
setAlpha
in interfaceIndependenceTest
- Parameters:
alpha
- This level.
-
getData
getData.
- Specified by:
getData
in interfaceIndependenceTest
- Returns:
- The data model for the independence test, either a DataSet or a CovarianceMatrix.
- See Also:
-
getH
-
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:
isVerbose
in interfaceIndependenceTest
- Returns:
- True if the case.
-
setVerbose
public void setVerbose(boolean verbose) Sets whether this test will print verbose output.- Specified by:
setVerbose
in interfaceIndependenceTest
- Parameters:
verbose
- True, if so.
-