public interface VariableLengthDiffSM extends DifferentiableStatisticalModel
DifferentiableStatisticalModels that allow to score
subsequences of arbitrary length. This DifferentiableStatisticalModel should be the
super class for non-motif DifferentiableStatisticalModels 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, isNormalizedclone, getCurrentParameterValues, getInitialClassParam, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getNumberOfParameters, getNumberOfRecommendedStarts, initializeFunction, initializeFunctionRandomly, setParametersemitDataSet, getLogProbFor, getLogProbFor, getLogProbFor, getMaximalMarkovOrdergetAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized, toStringdouble 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)
SequenceScoregetLogScoreFor in interface SequenceScoreseq - the Sequencestartpos - the start position in the Sequenceendpos - the end position (inclusive) in the SequenceSequencedouble getLogScoreAndPartialDerivation(Sequence seq, int startpos, int endpos, IntList indices, DoubleList partialDer)
DifferentiableSequenceScoreSequence beginning at
position start in the Sequence and fills lists with
the indices and the partial derivations.getLogScoreAndPartialDerivation in interface DifferentiableSequenceScoreseq - the Sequencestartpos - the start position in the Sequenceendpos - the end position (inclusive) in the Sequenceindices - an IntList of indices, after method invocation the
list should contain the indices i where
is not zeropartialDer - a DoubleList of partial derivations, after method
invocation the list should contain the corresponding
that are not zeroSequencevoid setStatisticForHyperparameters(int[] length,
double[] weight)
throws Exception
length) and how often (
weight) they have been seen.