Class CptInvariantMarginalCalculator

java.lang.Object
edu.cmu.tetrad.bayes.CptInvariantMarginalCalculator
All Implemented Interfaces:
TetradSerializable, Serializable

public final class CptInvariantMarginalCalculator extends Object implements TetradSerializable
Calculates marginals of the form P(V=v') for an updated Bayes net for purposes of the CPT Invariant Updater.
Author:
josephramsey
See Also:
  • Constructor Details

    • CptInvariantMarginalCalculator

      public CptInvariantMarginalCalculator(BayesIm bayesIm, Evidence evidence)
      Constructs 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

    • serializableInstance

      public static CptInvariantMarginalCalculator serializableInstance()
      Generates a simple exemplar of this class to test serialization.
    • getMarginal

      public double getMarginal(int variable, int category)
      Returns:
      P(variable = category).
    • getUpdatedBayesIm

      public UpdatedBayesIm getUpdatedBayesIm()