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
Class SimpleDifferentiableState

    java.lang.Object
      de.jstacs.models.hmm.states.SimpleState
          de.jstacs.models.hmm.states.SimpleDifferentiableState

All Implemented Interfaces:
  State, DifferentiableState, TrainableState

    public class SimpleDifferentiableState

extends SimpleState
implements DifferentiableState

This class implements a `State` based on `Emission` that allows to reuse `Emission`s for different `State`s.

Author:
  Jens Keilwagen

Field Summary

Fields inherited from class de.jstacs.models.hmm.states.SimpleState
`e, forward, name`

Constructor Summary
`SimpleDifferentiableState(DifferentiableEmission e, String name, boolean forward)` This is the constructor of a `SimpleState`.

Method Summary
`double` | `getLogScoreAndPartialDerivation(int startPos, int endPos, IntList indices, DoubleList partDer, Sequence seq)` This method allows to compute the logarithm of the score and the gradient for the given subsequences.

Methods inherited from class de.jstacs.models.hmm.states.SimpleState
`addToStatistic, getEmissionType, getGraphvizNodeOptions, getLogScoreFor, isSilent, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface de.jstacs.models.hmm.State
`getEmissionType, getGraphvizNodeOptions, getLogScoreFor, isSilent`

Constructor Detail

### SimpleDifferentiableState

    public SimpleDifferentiableState(DifferentiableEmission e,
                                     String name,
                                     boolean forward)

  This is the constructor of a `SimpleState`.

  Parameters:
    `e` - the emission that is internally used for scoring subsequences
    `name` - the name of the state
    `forward` - a switch that decides whether to use the forward or the reverse complementary strand of a sequence

Method Detail

### getLogScoreAndPartialDerivation

    public double getLogScoreAndPartialDerivation(int startPos,
                                                  int endPos,
                                                  IntList indices,
                                                  DoubleList partDer,
                                                  Sequence seq)
                                           throws WrongLengthException,
                                                  OperationNotSupportedException

  Description copied from interface: `DifferentiableState`
  This method allows to compute the logarithm of the score and the gradient for the given subsequences.

  Specified by:
    `getLogScoreAndPartialDerivation` in interface `DifferentiableState`
  Parameters:
    `startPos` - the start position (inclusive)
    `endPos` - the end position (inclusive)
    `indices` - a list for the parameter indices
    `partDer` - a list for the partial derivations
    `seq` - the `Sequence`(s)
  Returns:
    the logarithm of the score
  Throws:
    `WrongLengthException` - if the length can not be modeled
    `OperationNotSupportedException` - if the reverse complement of the sequence can not be computed

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