cc.mallet.grmm.inference
Class LoopyBP

java.lang.Object
  extended by cc.mallet.grmm.inference.AbstractInferencer
      extended by cc.mallet.grmm.inference.AbstractBeliefPropagation
          extended by cc.mallet.grmm.inference.LoopyBP
All Implemented Interfaces:
Inferencer, java.io.Serializable, java.lang.Cloneable

public class LoopyBP
extends AbstractBeliefPropagation

The loopy belief propagation algorithm for approximate inference in general graphical models. Created: Wed Nov 5 19:30:15 2003

Version:
$Id: LoopyBP.java,v 1.1 2007/10/22 21:37:49 mccallum Exp $
Author:
Charles Sutton
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class cc.mallet.grmm.inference.AbstractBeliefPropagation
AbstractBeliefPropagation.AbstractMessageStrategy, AbstractBeliefPropagation.MaxProductMessageStrategy, AbstractBeliefPropagation.MessageStrategy, AbstractBeliefPropagation.SumProductMessageStrategy
 
Field Summary
static int DEFAULT_MAX_ITER
           
 
Fields inherited from class cc.mallet.grmm.inference.AbstractBeliefPropagation
assignedVertexPtls, iterUsed, logger, mdlCurrent, normalizeBeliefs, useCaching
 
Constructor Summary
LoopyBP()
           
LoopyBP(AbstractBeliefPropagation.MessageStrategy messager, int maxIter)
           
LoopyBP(int maxIter)
           
 
Method Summary
 void computeMarginals(FactorGraph mdl)
          Computes marginal distributions for a factor graph.
static Inferencer createForMaxProduct()
           
 LoopyBP setRand(java.util.Random rand)
           
 void setUseCaching(boolean useCaching)
           
 
Methods inherited from class cc.mallet.grmm.inference.AbstractBeliefPropagation
copyOldMessages, doneWithGraph, dump, dump, getMessager, getMessagesSent, getMessagesUsedLastTime, getTotalMessagesSent, hasConverged, hasConverged, initForGraph, iterationsUsed, lookupLogJoint, lookupMarginal, lookupMarginal, reportTime, resetMessagesSentAtStart, sendMessage, sendMessage, setMessager
 
Methods inherited from class cc.mallet.grmm.inference.AbstractInferencer
duplicate, lookupJoint, query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_ITER

public static final int DEFAULT_MAX_ITER
See Also:
Constant Field Values
Constructor Detail

LoopyBP

public LoopyBP()

LoopyBP

public LoopyBP(int maxIter)

LoopyBP

public LoopyBP(AbstractBeliefPropagation.MessageStrategy messager,
               int maxIter)
Method Detail

setUseCaching

public void setUseCaching(boolean useCaching)

createForMaxProduct

public static Inferencer createForMaxProduct()

setRand

public LoopyBP setRand(java.util.Random rand)

computeMarginals

public void computeMarginals(FactorGraph mdl)
Description copied from interface: Inferencer
Computes marginal distributions for a factor graph.

Specified by:
computeMarginals in interface Inferencer
Specified by:
computeMarginals in class AbstractInferencer