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.

Author:
Choh Man Teng
See Also:
  • Constructor Details

    • Identifiability

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

      public Identifiability(BayesIm bayesIm, Evidence evidence)
  • Method Details

    • serializableInstance

      public static Identifiability serializableInstance()
      Generates a simple exemplar of this class to test serialization.
    • 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:
      the Bayes instantiated model that is being updated.
    • getManipulatedBayesIm

      public BayesIm getManipulatedBayesIm()
      Description copied from interface: ManipulatingBayesUpdater
      Returns the manipulated Bayes IM. This is the Bayes IM in which the variables in the manipulation have been removed from the graph.
      Specified by:
      getManipulatedBayesIm in interface ManipulatingBayesUpdater
      Returns:
      the updated BayesIm.
    • getManipulatedGraph

      public Graph getManipulatedGraph()
      Description copied from interface: ManipulatingBayesUpdater
      Returns the manipulated graph. This is the graph in which the variables in the manipulation have been removed from the graph.
      Specified by:
      getManipulatedGraph in interface ManipulatingBayesUpdater
      Returns:
      the graph for the manipulated BayesIm.
    • getUpdatedBayesIm

      public BayesIm getUpdatedBayesIm()
      The updated BayesIm. This is a different object from the source BayesIm.
      Specified by:
      getUpdatedBayesIm in interface ManipulatingBayesUpdater
      Returns:
      the updated Bayes IM--that is, the Bayes IM in which all probabilities of variables conditional on their parents have been updated.
      See Also:
    • getEvidence

      public Evidence getEvidence()
      Description copied from interface: ManipulatingBayesUpdater
      Returns the manipulation that was used to manipulate the Bayes IM.
      Specified by:
      getEvidence in interface ManipulatingBayesUpdater
      Returns:
      a defensive copy of the evidence.
    • setEvidence

      public void setEvidence(Evidence evidence)
      Description copied from interface: ManipulatingBayesUpdater
      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 - the new evidence.
    • isJointMarginalSupported

      public boolean isJointMarginalSupported()
      Description copied from interface: BayesUpdater
      Returns the joint marginal probability of the given variables taking the given values, given the evidence.
      Specified by:
      isJointMarginalSupported in interface BayesUpdater
      Returns:
      true if the getJointMarginal() method is supported.
    • getJointMarginal

      public double getJointMarginal(int[] sVariables, int[] sValues)
      Description copied from interface: BayesUpdater
      Returns the joint marginal probability of the given variables taking the given values, given the evidence.
      Specified by:
      getJointMarginal in interface BayesUpdater
      Parameters:
      sVariables - variable indices
      sValues - category indices
      Returns:
      P(variables[i] = values[i] | evidence), where evidence is getEvidence().
    • getMarginal

      public double getMarginal(int variable, int value)
      Description copied from interface: ManipulatingBayesUpdater
      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 = category | evidence) where evidence is getEvidence().
    • calculatePriorMarginals

      public double[] calculatePriorMarginals(int nodeIndex)
      Description copied from interface: BayesUpdater
      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)
      Description copied from interface: BayesUpdater
      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()
      Overrides:
      toString in class Object