Class IndependenceResult

java.lang.Object
edu.cmu.tetrad.search.test.IndependenceResult
All Implemented Interfaces:
TetradSerializable, Serializable

public final class IndependenceResult extends Object implements TetradSerializable

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 Details

    • IndependenceResult

      public IndependenceResult(IndependenceFact fact, boolean indep, double pValue, double score)
      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

      public static IndependenceResult serializableInstance()
      Generates a simple exemplar of this class to test serialization.
      See Also:
    • getFact

      public IndependenceFact 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

      public String toString()
      Returns a string represnetation of this independence fact.
      Overrides:
      toString in class Object
      Returns:
      This string.
    • getScore

      public double getScore()