Package edu.cmu.tetrad.bayes
Interface ManipulatingBayesUpdater
- All Superinterfaces:
- BayesUpdater,- Serializable,- TetradSerializable
- All Known Implementing Classes:
- ApproximateUpdater,- CptInvariantUpdater,- Identifiability,- JunctionTreeUpdater,- RowSummingExactUpdater
Interface for a Bayes updating algorithm that's capable of doing manipulation. In general, manipulating a variable X
 will eliminate edges into X, so the updating operation on the manipulated model will produce different results.
- Version:
- $Id: $Id
- Author:
- josephramsey
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final longConstantserialVersionUID=23L
- 
Method SummaryModifier and TypeMethodDescriptionReturns the manipulation that was used to manipulate the Bayes IM.Returns the manipulated Bayes IM.Returns the manipulated graph.doublegetMarginal(int variable, int category) Returns the marginal probability of the given variable taking the given value, given the evidence.Returns the updated Bayes IM.voidsetEvidence(Evidence evidence) Sets new evidence for the updater.Methods inherited from interface edu.cmu.tetrad.bayes.BayesUpdatercalculatePriorMarginals, calculateUpdatedMarginals, getBayesIm, getJointMarginal, isJointMarginalSupported
- 
Field Details- 
serialVersionUIDstatic final long serialVersionUIDConstantserialVersionUID=23L- See Also:
 
 
- 
- 
Method Details- 
getManipulatedBayesImBayesIm getManipulatedBayesIm()Returns the manipulated Bayes IM. This is the Bayes IM in which the variables in the manipulation have been removed from the graph.- Returns:
- the Bayes instantiated model after manipulations have been applied.
 
- 
getManipulatedGraphGraph getManipulatedGraph()Returns the manipulated graph. This is the graph in which the variables in the manipulation have been removed from the graph.- Returns:
- the graph for the manipulated BayesIm.
 
- 
getEvidenceEvidence getEvidence()Returns the manipulation that was used to manipulate the Bayes IM.- Returns:
- a defensive copy of the evidence.
 
- 
setEvidenceSets 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 interface- BayesUpdater
- Parameters:
- evidence- evidence
 
- 
getUpdatedBayesImBayesIm getUpdatedBayesIm()Returns the updated Bayes IM. This is the Bayes IM in which all probabilities of variables conditional on their parents have been updated.- Returns:
- the updated Bayes IM--that is, the Bayes IM in which all probabilities of variables conditional on their parents have been updated.
 
- 
getMarginaldouble getMarginal(int variable, int category) 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 interface- BayesUpdater
- Parameters:
- variable- variable index
- category- category index
- Returns:
- P(variable = value | evidence), where evidence is getEvidence().
 
 
-