Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.models.hmm.transitions
Interface TransitionWithSufficientStatistic

All Superinterfaces:
  Cloneable, Storable, Transition

All Known Subinterfaces:
  SamplingTransition, TrainableAndDifferentiableTransition, TrainableTransition

All Known Implementing Classes:
  BasicHigherOrderTransition, HigherOrderTransition

    public interface TransitionWithSufficientStatistic

extends Transition

This interface defines method for reseting and filling an internal sufficient statistic. Using this statistic the interfaces `TrainableTransition` and `SamplingTransition` can be used to estimate the parameters (cf. `TrainableTransition.estimateFromStatistic()`) or to draw new parameters (cf. `SamplingFromStatistic.drawParametersFromStatistic()`).

Author:
  Jens Keilwagen
See Also:
  `TrainableTransition`, `SamplingTransition`

Method Summary
`void` | `addToStatistic(int layer, int index, int childIdx, double weight, Sequence sequence, int sequencePosition)` This method allows to add a certain `weight` to the sufficient statistic of a specific transition.
`double` | `getLogGammaScoreFromStatistic()` This method calculates a score for the current statistics, which is independent from the current parameters In general the gamma-score is a product of gamma-functions parameterized with the current statistics
`void` | `resetStatistic()` This method reset the internal sufficient statistics that can be used for estimating the parameters.

Methods inherited from interface de.jstacs.models.hmm.Transition
`clone, fillTransitionInformation, getChildIdx, getGraphizNetworkRepresentation, getLastContextState, getLogPriorTerm, getLogScoreFor, getMaximalInDegree, getMaximalMarkovOrder, getMaximalNumberOfChildren, getNumberOfChildren, getNumberOfIndexes, getNumberOfStates, hasAnySelfTransitions, initializeRandomly, isAbsoring, toString`

Methods inherited from interface de.jstacs.Storable
`toXML`

Method Detail

### resetStatistic

    void resetStatistic()

  This method reset the internal sufficient statistics that can be used for estimating the parameters.

### addToStatistic

    void addToStatistic(int layer,
                        int index,
                        int childIdx,
                        double weight,
                        Sequence sequence,
                        int sequencePosition)

  This method allows to add a certain `weight` to the sufficient statistic of a specific transition.

  Parameters:
    `layer` - the layer of the matrix
    `index` - the index encoding the context
    `childIdx` - the index of the child
    `weight` - the weight added to the sufficient statistic
    `sequence` - the sequence
    `sequencePosition` - the position within the sequence

### getLogGammaScoreFromStatistic

    double getLogGammaScoreFromStatistic()

  This method calculates a score for the current statistics, which is independent from the current parameters In general the gamma-score is a product of gamma-functions parameterized with the current statistics

  Returns:
    the logarithm of the gamma-score for the current statistics

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD