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.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()getData.getH()getH.doubleGetter 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.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.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
checkIndependence.
- Specified by:
checkIndependencein interfaceIndependenceTest- Parameters:
x- aNodeobjecty- aNodeobject_z- aSetobject- Returns:
- an IndependenceResult (see).
- See Also:
-
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
getVariables.
- Specified by:
getVariablesin 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:
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
getData.
- Specified by:
getDatain interfaceIndependenceTest- Returns:
- The data model for the independence test, either a DataSet or a CovarianceMatrix.
- See Also:
-
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.
-