Interface BayesUpdater

All Superinterfaces:
Serializable, TetradSerializable
All Known Subinterfaces:
ManipulatingBayesUpdater
All Known Implementing Classes:
ApproximateUpdater, CptInvariantUpdater, Identifiability, JunctionTreeUpdater, RowSummingExactUpdater

public interface BayesUpdater extends TetradSerializable
Interface for a discrete Bayes updating algorithm. The main task of such and algorithm is to calculate P(X = x' | evidence), where evidence takes the form of a Proposition over the variables in the Bayes net, possibly with additional information about which variables in the Bayes net have been manipulated. Some updaters may be able to calculate joint marginals as well--that is, P(AND_i{Xi = xi'} | evidence). Also, not all updaters can take manipulation information into account. See implementations for details.
Author:
josephramsey
See Also:
  • Field Details

  • Method Details

    • getMarginal

      double getMarginal(int variable, int category)
      Returns:
      P(variable = value | evidence), where evidence is getEvidence().
    • isJointMarginalSupported

      boolean isJointMarginalSupported()
      Returns:
      true if the getJointMarginal() method is supported.
    • getJointMarginal

      double getJointMarginal(int[] variables, int[] values)
      Returns:
      P(variables[i] = values[i] | evidence), where evidence is getEvidence().
    • setEvidence

      void setEvidence(Evidence evidence)
      Sets new evidence for the updater. Once this is called, old updating results should not longer be available.
    • getBayesIm

      BayesIm getBayesIm()
      Returns:
      the Bayes instantiated model that is being updated.
    • calculatePriorMarginals

      double[] calculatePriorMarginals(int nodeIndex)
    • calculateUpdatedMarginals

      double[] calculateUpdatedMarginals(int nodeIndex)