public interface DifferentiableEmission extends Emission
| Modifier and Type | Method and Description |
|---|---|
void |
addGradientOfLogPriorTerm(double[] grad,
int offset)
This method computes the gradient of
Emission.getLogPriorTerm() for each
parameter of this model. |
void |
fillCurrentParameter(double[] params)
Fills the current parameters in the global
params array using the internal offset. |
void |
fillSamplingGroups(int parameterOffset,
LinkedList<int[]> list)
Adds the groups of indexes of those parameters of this emission that should be sampled
together in one step of a grouped sampling procedure, each as an
int[], into list. |
double |
getLogProbAndPartialDerivationFor(boolean forward,
int startPos,
int endPos,
IntList indices,
DoubleList partDer,
Sequence seq)
|
int |
getNumberOfParameters()
Returns the number of parameters of this emission.
|
int |
getSizeOfEventSpace()
Returns the size of the event space, i.e., the number of possible outcomes,
for the random variables of this emission
|
void |
setParameter(double[] params,
int offset)
This method sets the internal parameters using the given global parameter array, the global offset of the HMM and the internal offset.
|
int |
setParameterOffset(int offset)
This method sets the internal parameter offset and returns the new parameter offset for further use.
|
addToStatistic, estimateFromStatistic, getAlphabetContainer, getLogPriorTerm, getLogProbFor, getNodeLabel, getNodeShape, initializeFunctionRandomly, joinStatistics, resetStatistic, setParameters, toStringvoid fillCurrentParameter(double[] params)
params array using the internal offset.params - the global parameter array of the HMMsetParameterOffset(int)void setParameter(double[] params,
int offset)
params - the global parameter array of the classifieroffset - the offset of the HMMsetParameterOffset(int)int setParameterOffset(int offset)
offset - the offset to be setdouble getLogProbAndPartialDerivationFor(boolean forward,
int startPos,
int endPos,
IntList indices,
DoubleList partDer,
Sequence seq)
throws OperationNotSupportedException
Sequence beginning at
position start in the Sequence and fills lists with
the indices and the partial derivations.forward - a switch whether to use the forward or the reverse complementary strand of the sequenceseq - the SequencestartPos - the start position in the SequenceendPos - the end position in the Sequenceindices - an IntList of indices, after method invocation the
list should contain the indices i where
is not zeropartDer - a DoubleList of partial derivations, after method
invocation the list should contain the corresponding
that are not zeroSequenceOperationNotSupportedException - if forward==false and the reverse complement of the sequence can not be computedvoid addGradientOfLogPriorTerm(double[] grad,
int offset)
Emission.getLogPriorTerm() for each
parameter of this model. The results are added to the array
grad beginning at index (offset + internal offset).grad - the array of gradientsoffset - the start index of the HMM in the grad array, where the
partial derivations for the parameters of the HMM shall be
enteredEmission.getLogPriorTerm(),
setParameterOffset(int)void fillSamplingGroups(int parameterOffset,
LinkedList<int[]> list)
int[], into list.
In most cases, one group should contain the parameters that are living on a common simplex.
The internal indexes of the parameters are incremeneted by an external parameterOffsetparameterOffset - the external parameter offsetlist - the list of sampling groupsint getNumberOfParameters()
int getSizeOfEventSpace()