cc.mallet.grmm.inference
Class GibbsSampler

java.lang.Object
  extended by cc.mallet.grmm.inference.GibbsSampler
All Implemented Interfaces:
Sampler

public class GibbsSampler
extends java.lang.Object
implements Sampler

Created: Mar 28, 2005

Version:
$Id: GibbsSampler.java,v 1.1 2007/10/22 21:37:49 mccallum Exp $
Author:
Constructor Summary
GibbsSampler()
           
GibbsSampler(int burnin)
           
GibbsSampler(Randoms r, int burnin)
           
 
Method Summary
 Assignment sample(FactorGraph mdl, int N)
          Samples from the distribution of a given undirected model.
 void setBurnin(int burnin)
           
 void setRandom(Randoms r)
          Sets the random seed used by this sampler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GibbsSampler

public GibbsSampler()

GibbsSampler

public GibbsSampler(int burnin)

GibbsSampler

public GibbsSampler(Randoms r,
                    int burnin)
Method Detail

setBurnin

public void setBurnin(int burnin)

setRandom

public void setRandom(Randoms r)
Description copied from interface: Sampler
Sets the random seed used by this sampler.

Specified by:
setRandom in interface Sampler
Parameters:
r - Random object to be used by this sampler.

sample

public Assignment sample(FactorGraph mdl,
                         int N)
Description copied from interface: Sampler
Samples from the distribution of a given undirected model.

Specified by:
sample in interface Sampler
Parameters:
mdl - Model to sample from
N - Number of samples to generate
Returns:
A list of assignments to the model.