cc.mallet.grmm.inference
Class SamplingInferencer

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

public class SamplingInferencer
extends AbstractInferencer

Approximate inferencer for graphical models using sampling. A general inference engine that takes any Sampler engine, and performs approximate inference using its samples. Created: Mar 28, 2005

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

Constructor Summary
SamplingInferencer(Sampler sampler, int n)
           
 
Method Summary
 void computeMarginals(FactorGraph mdl)
          Computes marginal distributions for a factor graph.
 Factor lookupMarginal(Variable var)
          Returns the computed marginal of a given variable.
 Factor lookupMarginal(VarSet varSet)
          Returns the computed marginal of a given clique in a graph.
 java.lang.String toString()
           
 
Methods inherited from class cc.mallet.grmm.inference.AbstractInferencer
dump, duplicate, lookupJoint, lookupLogJoint, query, reportTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SamplingInferencer

public SamplingInferencer(Sampler sampler,
                          int n)
Method Detail

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

lookupMarginal

public Factor lookupMarginal(Variable var)
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)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object