cc.mallet.grmm.inference.gbp
Class ParentChildGBP

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

public class ParentChildGBP
extends AbstractInferencer

Created: May 27, 2005

Version:
$Id: ParentChildGBP.java,v 1.1 2007/10/22 21:37:58 mccallum Exp $
Author:
Serialized Form

Constructor Summary
ParentChildGBP(RegionGraphGenerator regioner)
           
ParentChildGBP(RegionGraphGenerator regioner, MessageStrategy sender)
           
 
Method Summary
 void computeMarginals(FactorGraph mdl)
          Computes marginal distributions for a factor graph.
 void dump()
           
 double getInertiaWeight()
           
 boolean getUseInertia()
           
 double lookupLogJoint(Assignment assn)
          Returns the natural logarithm of the joint probability of a given assignment, computed in some factorized fashion.
 Factor lookupMarginal(Variable variable)
          Returns the computed marginal of a given variable.
 Factor lookupMarginal(VarSet varSet)
          Returns the computed marginal of a given clique in a graph.
static ParentChildGBP makeBPInferencer()
           
static ParentChildGBP makeKikuchiInferencer()
           
 void setInertiaWeight(double inertiaWeight)
           
 void setUseInertia(boolean useInertia)
           
 
Methods inherited from class cc.mallet.grmm.inference.AbstractInferencer
duplicate, lookupJoint, query, reportTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParentChildGBP

public ParentChildGBP(RegionGraphGenerator regioner)

ParentChildGBP

public ParentChildGBP(RegionGraphGenerator regioner,
                      MessageStrategy sender)
Method Detail

makeBPInferencer

public static ParentChildGBP makeBPInferencer()

makeKikuchiInferencer

public static ParentChildGBP makeKikuchiInferencer()

getUseInertia

public boolean getUseInertia()

setUseInertia

public void setUseInertia(boolean useInertia)

getInertiaWeight

public double getInertiaWeight()

setInertiaWeight

public void setInertiaWeight(double inertiaWeight)

lookupMarginal

public Factor lookupMarginal(Variable variable)
Description copied from interface: Inferencer
Returns the computed marginal of a given variable. Before using this method, computeMarginals must have been previously called on the graphical model that contains v.

Specified by:
lookupMarginal in interface Inferencer
Specified by:
lookupMarginal in class AbstractInferencer
See Also:
Inferencer.computeMarginals(FactorGraph)

lookupMarginal

public Factor lookupMarginal(VarSet varSet)
Description copied from interface: Inferencer
Returns the computed marginal of a given clique in a graph. Before using this method, computeMarginals must have been previously called on the graphical model that contains the clique.

Specified by:
lookupMarginal in interface Inferencer
Overrides:
lookupMarginal in class AbstractInferencer
See Also:
Inferencer.computeMarginals(cc.mallet.grmm.types.FactorGraph), #computeMarginals(JunctionTree)

lookupLogJoint

public double lookupLogJoint(Assignment assn)
Description copied from interface: Inferencer
Returns the natural logarithm of the joint probability of a given assignment, computed in some factorized fashion. Before using this method, computeMarginals must have been previously called on the graphical model that contains the variables of assn.

This method is less likely to underflow than Math.log (lookupJoint (assn)).

Specified by:
lookupLogJoint in interface Inferencer
Overrides:
lookupLogJoint in class AbstractInferencer
See Also:
Inferencer.computeMarginals(cc.mallet.grmm.types.FactorGraph), #computeMarginals(JunctionTree)

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

dump

public void dump()
Specified by:
dump in interface Inferencer
Overrides:
dump in class AbstractInferencer