Package edu.cmu.tetrad.search.test
Class IndependenceResult
java.lang.Object
edu.cmu.tetrad.search.test.IndependenceResult
- All Implemented Interfaces:
TetradSerializable
,Serializable
Stores a single conditional independence result, e.g., whether X _||_ Y | Z1,..,Zn holds or does not, and the p-value of the test.
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIndependenceResult
(IndependenceFact fact, boolean indep, double pValue, double score) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetFact()
Returns the independence fact being stored.double
Returns the p-value of the fact under the null hypothesis of independence.double
getScore()
boolean
Returns whether the fact fails to hold--i.e., if the judgment is for dependence.boolean
Returns whether the fact holds--i.e., if the judgment is for independence.static IndependenceResult
Generates a simple exemplar of this class to test serialization.toString()
Returns a string represnetation of this independence fact.
-
Constructor Details
-
IndependenceResult
Constructor.- Parameters:
fact
- The fact itself.indep
- The conditional independence result, true if the fact holds, false if not.pValue
- The p-values of the independence result, under the null (independence) hypothesis.- See Also:
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization.- See Also:
-
getFact
Returns the independence fact being stored.- Returns:
- This fact
- See Also:
-
isIndependent
public boolean isIndependent()Returns whether the fact holds--i.e., if the judgment is for independence.- Returns:
- True if the fact holds, false if ot.
- See Also:
-
isDependent
public boolean isDependent()Returns whether the fact fails to hold--i.e., if the judgment is for dependence. This is the negation of isIndependent.- Returns:
- True if the fact does not, false if it does.
- See Also:
-
getPValue
public double getPValue()Returns the p-value of the fact under the null hypothesis of independence. A special case obtains if this fact is being used to store a d-separation fact, in which case the "p-value" is deemed to be 0 if the fact holds and 1 if it does not.- Returns:
- The p-value of the result under the null hypothesis.
-
toString
Returns a string represnetation of this independence fact. -
getScore
public double getScore()
-