Package edu.cmu.tetrad.bayes
Class CptInvariantMarginalCalculator
java.lang.Object
edu.cmu.tetrad.bayes.CptInvariantMarginalCalculator
- All Implemented Interfaces:
- TetradSerializable,- Serializable
Calculates marginals of the form P(V=v') for an updated Bayes net for purposes of the CPT Invariant Updater.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCptInvariantMarginalCalculator(BayesIm bayesIm, Evidence evidence) Constructs a new marginal calculator for the given updated Bayes IM.
- 
Method SummaryModifier and TypeMethodDescriptiondoublegetMarginal(int variable, int category) getMarginal.Getter for the fieldupdatedBayesIm.Generates a simple exemplar of this class to test serialization.
- 
Constructor Details- 
CptInvariantMarginalCalculatorConstructs a new marginal calculator for the given updated Bayes IM. It is assumed that the first BayesIm encountered on calling the getParentIm() method recursively is the Bayes IM with respect to which conjunctions of the form P(V1=v1' and V2=v2' and ... and Vn=vn') should be calculated.
 
- 
- 
Method Details- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.- Returns:
- a CptInvariantMarginalCalculatorobject
 
- 
getMarginalpublic double getMarginal(int variable, int category) getMarginal. - Parameters:
- variable- a int
- category- a int
- Returns:
- P(variable = category).
 
- 
getUpdatedBayesImGetter for the field updatedBayesIm.- Returns:
- a UpdatedBayesImobject
 
 
-