de.jstacs.sequenceScores.statisticalModels.trainable.hmm.states
Class SimpleDifferentiableState
java.lang.Object
de.jstacs.sequenceScores.statisticalModels.trainable.hmm.states.SimpleState
de.jstacs.sequenceScores.statisticalModels.trainable.hmm.states.SimpleDifferentiableState
- All Implemented Interfaces:
- DifferentiableState, State, TrainableState
public class SimpleDifferentiableState
- extends SimpleState
- implements DifferentiableState
This class implements a State based on Emission that allows to reuse Emissions for different States.
- Author:
- Jens Keilwagen
| Fields inherited from class de.jstacs.sequenceScores.statisticalModels.trainable.hmm.states.SimpleState |
e, forward, name |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 subsequencesname - the name of the stateforward - a switch that decides whether to use the forward or the reverse complementary strand of a sequence
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 indicespartDer - a list for the partial derivationsseq - 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