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.states.emissions
Interface Emission

All Superinterfaces:
  Cloneable, Storable

All Known Subinterfaces:
  DifferentiableEmission, SamplingEmission

All Known Implementing Classes:
  AbstractConditionalDiscreteEmission, DiscreteEmission, GaussianEmission, MixtureEmission, PhyloDiscreteEmission, PluginGaussianEmission, ReferenceSequenceDiscreteEmission, SilentEmission

    public interface Emission

extends Storable, Cloneable

This interface declares all method for an emission of a state.

Author:
  Jens Keilwagen
See Also:
  `State`

Method Summary
`void` | `addToStatistic(boolean forward, int startPos, int endPos, double weight, Sequence seq)` This method adds the `weight` to the internal sufficient statistic.
`void` | `estimateFromStatistic()` This method estimates the parameters from the internal sufficient statistic.
`AlphabetContainer` | `getAlphabetContainer()` This method returns the `AlphabetContainer` of this emission.
`double` | `getLogPriorTerm()` Returns a value that is proportional to the log of the prior.
`double` | `getLogProbFor(boolean forward, int startPos, int endPos, Sequence seq)` This method computes the logarithm of the likelihood.
`String` | `getNodeLabel(double weight, String name, NumberFormat nf)` Returns the graphviz label of the node containing this emission.
`String` | `getNodeShape(boolean forward)` Returns the graphviz string for the shape of the node.
`void` | `initializeFunctionRandomly()` This method initializes the emission randomly.
`void` | `resetStatistic()` This method resets the internal sufficient statistic.

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

Method Detail

### getAlphabetContainer

    AlphabetContainer getAlphabetContainer()

  This method returns the `AlphabetContainer` of this emission.

  Returns:
    the `AlphabetContainer` of this emission

### initializeFunctionRandomly

    void initializeFunctionRandomly()

  This method initializes the emission randomly.

### getLogProbFor

    double getLogProbFor(boolean forward,
                         int startPos,
                         int endPos,
                         Sequence seq)
                         throws OperationNotSupportedException

  This method computes the logarithm of the likelihood.

  Parameters:
    `forward` - whether to use the forward or the reverse strand
    `startPos` - the start position
    `endPos` - the end position
    `seq` - the sequence
  Returns:
    the logarithm of the probability
  Throws:
    `OperationNotSupportedException` - if `forward=false` and the reverse complement of the sequence `seq` is not defined

### getLogPriorTerm

    double getLogPriorTerm()

  Returns a value that is proportional to the log of the prior. For maximum likelihood (ML) 0 should be returned.

  Returns:
    a value that is proportional to the log of the prior
  See Also:
    `Model.getLogPriorTerm()`

### resetStatistic

    void resetStatistic()

  This method resets the internal sufficient statistic.

### addToStatistic

    void addToStatistic(boolean forward,
                        int startPos,
                        int endPos,
                        double weight,
                        Sequence seq)
                        throws OperationNotSupportedException

  This method adds the `weight` to the internal sufficient statistic.

  Parameters:
    `forward` - whether to use the forward or the reverse strand
    `startPos` - the start position
    `endPos` - the end position
    `weight` - the weight of the sequence
    `seq` - the sequence
  Throws:
    `OperationNotSupportedException` - if `forward=false` and the reverse complement of the sequence `seq` is not defined

### estimateFromStatistic

    void estimateFromStatistic()

  This method estimates the parameters from the internal sufficient statistic.

### getNodeShape

    String getNodeShape(boolean forward)

  Returns the graphviz string for the shape of the node.

  Parameters:
    `forward` - if this emission is used on the forward strand
  Returns:
    the shape

### getNodeLabel

    String getNodeLabel(double weight,
                        String name,
                        NumberFormat nf)

  Returns the graphviz label of the node containing this emission.

  Parameters:
    `weight` - the weight of the node which is represented by the color of the node, or -1 for no representation, i.e., white background
    `name` - the name of the state using this emission
    `nf` - the `NumberFormat` for formatting the textual representation of this emission
  Returns:
    the label

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