de.jstacs.sampling
Interface GibbsSamplingModel
- All Superinterfaces:
- SamplingComponent
- All Known Implementing Classes:
- FSDAGModelForGibbsSampling
public interface GibbsSamplingModel
- extends SamplingComponent
This is the interface that any AbstractModel
has to implement if it
should be used in a sampling.
During the sampling the method drawParameters(Sample, double[] )
is used for
drawing the parameters from the posterior.
- Author:
- Berit Haldemann, Jens Keilwagen
- See Also:
AbstractModel
,
AbstractMixtureModel
,
AbstractMixtureModel.Algorithm.GIBBS_SAMPLING
Method Summary |
void |
drawParameters(Sample data,
double[] weights)
This method draws the parameters of the model from the a posteriori
density. |
drawParameters
void drawParameters(Sample data,
double[] weights)
throws Exception
- This method draws the parameters of the model from the a posteriori
density. It is recommended to write the parameters to a specific file using
SamplingComponent.acceptParameters()
so that they can later be parsed using the
methods of the interface.
Before using this method the method SamplingComponent.initForSampling(int)
should be
called.
- Parameters:
data
- a sampleweights
- the (non-negative) weights for each sequence of the sample
- Throws:
Exception
- if there is a problem with drawing the parameters, the model
is not initialized, ...- See Also:
SamplingComponent.initForSampling(int)
,
SamplingComponent.acceptParameters()