cc.mallet.grmm.inference
Class TRP
java.lang.Object
cc.mallet.grmm.inference.AbstractInferencer
cc.mallet.grmm.inference.AbstractBeliefPropagation
cc.mallet.grmm.inference.TRP
- All Implemented Interfaces:
- Inferencer, java.io.Serializable, java.lang.Cloneable
public class TRP
- extends AbstractBeliefPropagation
Implementation of Wainwright's TRP schedule for loopy BP
in general graphical models.
- Version:
- $Id: TRP.java,v 1.1 2007/10/22 21:37:49 mccallum Exp $
- Author:
- Charles Sutton
- See Also:
- Serialized Form
Methods inherited from class cc.mallet.grmm.inference.AbstractBeliefPropagation |
copyOldMessages, doneWithGraph, dump, dump, getMessager, getMessagesSent, getMessagesUsedLastTime, getTotalMessagesSent, hasConverged, hasConverged, iterationsUsed, lookupLogJoint, lookupMarginal, lookupMarginal, reportTime, resetMessagesSentAtStart, sendMessage, sendMessage, setMessager |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TRP
public TRP()
TRP
public TRP(TRP.TreeFactory f)
TRP
public TRP(TRP.TerminationCondition cond)
TRP
public TRP(TRP.TreeFactory f,
TRP.TerminationCondition cond)
createForMaxProduct
public static TRP createForMaxProduct()
setTerminator
public TRP setTerminator(TRP.TerminationCondition cond)
setFactory
public TRP setFactory(TRP.TreeFactory factory)
setRandomSeed
public void setRandomSeed(long seed)
setVerboseOutputDirectory
public void setVerboseOutputDirectory(java.io.File verboseOutputDirectory)
isConverged
public boolean isConverged()
initForGraph
protected void initForGraph(FactorGraph m)
- Overrides:
initForGraph
in class AbstractBeliefPropagation
computeMarginals
public void computeMarginals(FactorGraph m)
- Description copied from interface:
Inferencer
- Computes marginal distributions for a factor graph.
- Specified by:
computeMarginals
in interface Inferencer
- Specified by:
computeMarginals
in class AbstractInferencer
query
public Factor query(DirectedModel m,
Variable var)
bestAssignment
public Assignment bestAssignment()
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object