|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DifferentiableTransition
This class declares methods that allow for optimizing the parameters numerically using the Optimizer.
| Method Summary | |
|---|---|
void |
addGradientForLogPriorTerm(double[] gradient,
int start)
This method computes the gradient of Transition.getLogPriorTerm() for each
parameter of this transition. |
void |
fillParameters(double[] params)
This method allows to fill the parameters of the transition in a given array. |
void |
fillSamplingGroups(int parameterOffset,
LinkedList<int[]> list)
Adds the groups of indexes of those parameters of this transition that should be sampled together in one step of a grouped sampling procedure, each as an int[], into list. |
double |
getLogScoreAndPartialDerivation(int layer,
int index,
int childIdx,
IntList indices,
DoubleList partDer,
Sequence sequence,
int sequencePosition)
This method allows to compute the logarithm of the score and the gradient for a specific transition. |
int |
getSizeOfEventSpace(int index)
Returns the size of the event space, i.e., the number of possible outcomes, for the random variable of parameter index |
int |
setParameterOffset(int offset)
This method sets the internal offset of the parameter index. |
void |
setParameters(double[] params,
int start)
This method allows to set the parameters of the transition. |
| Methods inherited from interface de.jstacs.sequenceScores.statisticalModels.trainable.hmm.transitions.Transition |
|---|
clone, fillTransitionInformation, getChildIdx, getGraphizNetworkRepresentation, getLastContextState, getLogPriorTerm, getLogScoreFor, getMaximalInDegree, getMaximalMarkovOrder, getMaximalNumberOfChildren, getNumberOfChildren, getNumberOfIndexes, getNumberOfStates, hasAnySelfTransitions, initializeRandomly, isAbsoring, setParameters, toString |
| Methods inherited from interface de.jstacs.Storable |
|---|
toXML |
| Method Detail |
|---|
int setParameterOffset(int offset)
offset - the offset
void setParameters(double[] params,
int start)
params - the parametersstart - the (global) start positionvoid fillParameters(double[] params)
params - the parameters
double getLogScoreAndPartialDerivation(int layer,
int index,
int childIdx,
IntList indices,
DoubleList partDer,
Sequence sequence,
int sequencePosition)
layer - the layer of the matrixindex - the index encoding the contextchildIdx - the index of the childindices - a list for the parameter indicespartDer - a list for the partial derivationssequencePosition - the position within the sequencesequence - the sequence
Transition.getLogScoreFor(int, int, int, Sequence, int)
void addGradientForLogPriorTerm(double[] gradient,
int start)
Transition.getLogPriorTerm() for each
parameter of this transition. The results are added to the array
gradient beginning at index start.
gradient - the array of gradientsstart - the start index in the gradient array, where the
partial derivations for the parameters of this Transition shall be
enteredint getSizeOfEventSpace(int index)
index
index - the index of the parameter
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, e.g. the parameters of one TransitionElement
of this transition. The internal indexes of the parameters are incremeneted by an external parameterOffset
parameterOffset - the external parameter offsetlist - the list of sampling groups
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||