de.jstacs.sampling
Interface SamplingFromStatistic

All Superinterfaces:
SamplingComponent
All Known Subinterfaces:
SamplingEmission, SamplingState, SamplingTransition
All Known Implementing Classes:
AbstractConditionalDiscreteEmission, DiscreteEmission, HigherOrderTransition, PhyloDiscreteEmission, ReferenceSequenceDiscreteEmission, SilentEmission, SimpleSamplingState

public interface SamplingFromStatistic
extends SamplingComponent

This is the interface for sampling based on a sufficient statistic.

During the sampling the method drawParametersFromStatistic() is used for drawing the parameters from the posterior.

Author:
Jens Keilwagen, Michael Scharfe

Method Summary
 void drawParametersFromStatistic()
          This method draws the parameters using a sufficient statistic representing a posteriori density.
 double getLogPosteriorFromStatistic()
          This method calculates the a-posteriori probability for the current statistics
 
Methods inherited from interface de.jstacs.sampling.SamplingComponent
acceptParameters, extendSampling, initForSampling, isInSamplingMode, parseNextParameterSet, parseParameterSet, samplingStopped
 

Method Detail

drawParametersFromStatistic

void drawParametersFromStatistic()
                                 throws Exception
This method draws the parameters using a sufficient statistic representing 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.

Throws:
Exception - if there is a problem with drawing the parameters, the initialization, ...
See Also:
SamplingComponent.initForSampling(int), SamplingComponent.acceptParameters()

getLogPosteriorFromStatistic

double getLogPosteriorFromStatistic()
This method calculates the a-posteriori probability for the current statistics

Returns:
the logarithm of the a-posteriori probability