Class Identifiability

java.lang.Object
edu.cmu.tetrad.bayes.Identifiability
All Implemented Interfaces:
BayesUpdater, ManipulatingBayesUpdater, TetradSerializable, Serializable

public final class Identifiability extends Object implements ManipulatingBayesUpdater
Identifiability, based on RowSummingExactUpdater

Jin Tian and Judea Pearl. On the Identification of Causal Effects. Technical Report R-290-L, Department of Computer Science, University of California, Los Angeles, 2002.

Version:
$Id: $Id
Author:
Choh Man Teng
See Also:
  • Constructor Details

    • Identifiability

      public Identifiability(BayesIm bayesIm)
      Constructs a new updater for the given Bayes net.
      Parameters:
      bayesIm - a BayesIm object
    • Identifiability

      public Identifiability(BayesIm bayesIm, Evidence evidence)

      Constructor for Identifiability.

      Parameters:
      bayesIm - a BayesIm object
      evidence - a Evidence object
  • Method Details

    • serializableInstance

      public static Identifiability serializableInstance()
      Generates a simple exemplar of this class to test serialization.
      Returns:
      a Identifiability object
    • getBayesIm

      public BayesIm getBayesIm()
      The BayesIm that this updater bases its update on. This BayesIm is not modified; rather, a new BayesIm is created and updated.
      Specified by:
      getBayesIm in interface BayesUpdater
      Returns:
      a BayesIm object
    • getManipulatedBayesIm

      public BayesIm getManipulatedBayesIm()

      Getter for the field manipulatedBayesIm.

      Specified by:
      getManipulatedBayesIm in interface ManipulatingBayesUpdater
      Returns:
      the updated BayesIm.
    • getManipulatedGraph

      public Graph getManipulatedGraph()

      getManipulatedGraph.

      Specified by:
      getManipulatedGraph in interface ManipulatingBayesUpdater
      Returns:
      a Graph object
    • getUpdatedBayesIm

      public BayesIm getUpdatedBayesIm()
      The updated BayesIm. This is a different object from the source BayesIm.
      Specified by:
      getUpdatedBayesIm in interface ManipulatingBayesUpdater
      Returns:
      a BayesIm object
      See Also:
    • getEvidence

      public Evidence getEvidence()

      Getter for the field evidence.

      Specified by:
      getEvidence in interface ManipulatingBayesUpdater
      Returns:
      a defensive copy of the evidence.
    • setEvidence

      public void setEvidence(Evidence evidence)
      Sets new evidence for the updater. Once this is called, old updating results should not longer be available.

      Sets new evidence for the updater. Once this is called, old updating results should not longer be available.

      Specified by:
      setEvidence in interface BayesUpdater
      Specified by:
      setEvidence in interface ManipulatingBayesUpdater
      Parameters:
      evidence - evidence
    • isJointMarginalSupported

      public boolean isJointMarginalSupported()

      isJointMarginalSupported.

      Specified by:
      isJointMarginalSupported in interface BayesUpdater
      Returns:
      a boolean
    • getJointMarginal

      public double getJointMarginal(int[] sVariables, int[] sValues)

      getJointMarginal.

      Specified by:
      getJointMarginal in interface BayesUpdater
      Parameters:
      sVariables - an array of int objects
      sValues - an array of int objects
      Returns:
      a double
    • getMarginal

      public double getMarginal(int variable, int value)
      Returns the marginal probability of the given variable taking the given value, given the evidence.

      Returns the updated graph. This is the graph in which all probabilities of variables conditional on their parents have been updated.

      Specified by:
      getMarginal in interface BayesUpdater
      Specified by:
      getMarginal in interface ManipulatingBayesUpdater
      Parameters:
      variable - variable index
      value - category index
      Returns:
      P(variable = value | evidence), where evidence is getEvidence().
    • calculatePriorMarginals

      public double[] calculatePriorMarginals(int nodeIndex)
      Calculates the prior marginal probabilities of the given node.
      Specified by:
      calculatePriorMarginals in interface BayesUpdater
      Parameters:
      nodeIndex - node index
      Returns:
      P(node = value), where value is the value of the node in the Bayes net.
    • calculateUpdatedMarginals

      public double[] calculateUpdatedMarginals(int nodeIndex)
      Calculates the updated marginal probabilities of the given node, given the evidence.
      Specified by:
      calculateUpdatedMarginals in interface BayesUpdater
      Parameters:
      nodeIndex - node index
      Returns:
      P(node = value | evidence), where value is the value of the node in the Bayes net.
    • toString

      public String toString()

      toString.

      Overrides:
      toString in class Object
      Returns:
      a String object