public interface VariableLengthDiffSM extends DifferentiableStatisticalModel
DifferentiableStatisticalModel
s that allow to score
subsequences of arbitrary length. This DifferentiableStatisticalModel
should be the
super class for non-motif DifferentiableStatisticalModel
s like homogeneous Markov
models, cyclic Markov models, ... etc.UNKNOWN
Modifier and Type | Method and Description |
---|---|
double |
getLogNormalizationConstant(int length)
This method returns the logarithm of the normalization constant for a given sequence
length.
|
double |
getLogPartialNormalizationConstant(int parameterIndex,
int length)
This method returns the logarithm of the partial normalization constant for a given
parameter index and a sequence length.
|
double |
getLogScoreAndPartialDerivation(Sequence seq,
int startpos,
int endpos,
IntList indices,
DoubleList partialDer)
|
double |
getLogScoreFor(Sequence seq,
int startpos,
int endpos)
|
void |
setStatisticForHyperparameters(int[] length,
double[] weight)
This method sets the hyperparameters for the model parameters by
evaluating the given statistic.
|
addGradientOfLogPriorTerm, getESS, getLogNormalizationConstant, getLogPartialNormalizationConstant, getLogPriorTerm, getSizeOfEventSpaceForRandomVariablesOfParameter, isNormalized
clone, getCurrentParameterValues, getInitialClassParam, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getNumberOfParameters, getNumberOfRecommendedStarts, initializeFunction, initializeFunctionRandomly, setParameters
emitDataSet, getLogProbFor, getLogProbFor, getLogProbFor, getMaximalMarkovOrder
getAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized, toString
double getLogNormalizationConstant(int length)
length
- the sequence lengthDifferentiableStatisticalModel.getLogNormalizationConstant()
double getLogPartialNormalizationConstant(int parameterIndex, int length) throws Exception
parameterIndex
- the index of the parameterlength
- the sequence lengthException
- if something went wrongDifferentiableStatisticalModel.getLogPartialNormalizationConstant(int)
double getLogScoreFor(Sequence seq, int startpos, int endpos)
SequenceScore
getLogScoreFor
in interface SequenceScore
seq
- the Sequence
startpos
- the start position in the Sequence
endpos
- the end position (inclusive) in the Sequence
Sequence
double getLogScoreAndPartialDerivation(Sequence seq, int startpos, int endpos, IntList indices, DoubleList partialDer)
DifferentiableSequenceScore
Sequence
beginning at
position start
in the Sequence
and fills lists with
the indices and the partial derivations.getLogScoreAndPartialDerivation
in interface DifferentiableSequenceScore
seq
- the Sequence
startpos
- the start position in the Sequence
endpos
- the end position (inclusive) in the Sequence
indices
- an IntList
of indices, after method invocation the
list should contain the indices i where
partialDer
- a DoubleList
of partial derivations, after method
invocation the list should contain the corresponding
Sequence
void setStatisticForHyperparameters(int[] length, double[] weight) throws Exception
length
) and how often (
weight
) they have been seen.