Package edu.cmu.tetrad.bayes
Class Identifiability
java.lang.Object
edu.cmu.tetrad.bayes.Identifiability
- All Implemented Interfaces:
BayesUpdater,ManipulatingBayesUpdater,TetradSerializable,Serializable
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 Summary
ConstructorsConstructorDescriptionIdentifiability(BayesIm bayesIm) Constructs a new updater for the given Bayes net.Identifiability(BayesIm bayesIm, Evidence evidence) Constructor for Identifiability. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]calculatePriorMarginals(int nodeIndex) Calculates the prior marginal probabilities of the given node.double[]calculateUpdatedMarginals(int nodeIndex) Calculates the updated marginal probabilities of the given node, given the evidence.The BayesIm that this updater bases its update on.Getter for the fieldevidence.doublegetJointMarginal(int[] sVariables, int[] sValues) getJointMarginal.Getter for the fieldmanipulatedBayesIm.getManipulatedGraph.doublegetMarginal(int variable, int value) Returns the marginal probability of the given variable taking the given value, given the evidence.The updated BayesIm.booleanisJointMarginalSupported.static IdentifiabilityGenerates a simple exemplar of this class to test serialization.voidsetEvidence(Evidence evidence) Sets new evidence for the updater.toString()toString.
-
Constructor Details
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization.- Returns:
- a
Identifiabilityobject
-
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:
getBayesImin interfaceBayesUpdater- Returns:
- a
BayesImobject
-
getManipulatedBayesIm
Getter for the field
manipulatedBayesIm.- Specified by:
getManipulatedBayesImin interfaceManipulatingBayesUpdater- Returns:
- the updated BayesIm.
-
getManipulatedGraph
getManipulatedGraph.
- Specified by:
getManipulatedGraphin interfaceManipulatingBayesUpdater- Returns:
- a
Graphobject
-
getUpdatedBayesIm
The updated BayesIm. This is a different object from the source BayesIm.- Specified by:
getUpdatedBayesImin interfaceManipulatingBayesUpdater- Returns:
- a
BayesImobject - See Also:
-
getEvidence
Getter for the field
evidence.- Specified by:
getEvidencein interfaceManipulatingBayesUpdater- Returns:
- a defensive copy of the evidence.
-
setEvidence
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:
setEvidencein interfaceBayesUpdater- Specified by:
setEvidencein interfaceManipulatingBayesUpdater- Parameters:
evidence- evidence
-
isJointMarginalSupported
public boolean isJointMarginalSupported()isJointMarginalSupported.
- Specified by:
isJointMarginalSupportedin interfaceBayesUpdater- Returns:
- a boolean
-
getJointMarginal
public double getJointMarginal(int[] sVariables, int[] sValues) getJointMarginal.
- Specified by:
getJointMarginalin interfaceBayesUpdater- Parameters:
sVariables- an array of objectssValues- an array of 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:
getMarginalin interfaceBayesUpdater- Specified by:
getMarginalin interfaceManipulatingBayesUpdater- Parameters:
variable- variable indexvalue- 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:
calculatePriorMarginalsin interfaceBayesUpdater- 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:
calculateUpdatedMarginalsin interfaceBayesUpdater- Parameters:
nodeIndex- node index- Returns:
- P(node = value | evidence), where value is the value of the node in the Bayes net.
-
toString
toString.
-