public abstract class AbstractVariableLengthDiffSM extends AbstractDifferentiableStatisticalModel implements VariableLengthDiffSM
DifferentiableStatisticalModel based on the declaration
of methods in VariableLengthDiffSM.
It allows 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.alphabets, length, rUNKNOWN| Modifier | Constructor and Description |
|---|---|
protected |
AbstractVariableLengthDiffSM(AlphabetContainer alphabets)
This is the main constructor that creates an instance of a
VariableLengthDiffSM that models sequences of arbitrary
length. |
protected |
AbstractVariableLengthDiffSM(AlphabetContainer alphabets,
int length)
This is the main constructor that creates an instance of a
VariableLengthDiffSM that models sequences of a given
length. |
protected |
AbstractVariableLengthDiffSM(StringBuffer source)
This is the constructor for the interface
Storable. |
| Modifier and Type | Method and Description |
|---|---|
double |
getLogNormalizationConstant()
Returns the logarithm of the sum of the scores over all sequences of the event space.
|
double |
getLogPartialNormalizationConstant(int parameterIndex)
Returns the logarithm of the partial normalization constant for the parameter with index
parameterIndex. |
abstract double |
getLogScoreAndPartialDerivation(Sequence seq,
int startpos,
int endpos,
IntList indices,
DoubleList partialDer)
|
double |
getLogScoreAndPartialDerivation(Sequence seq,
int start,
IntList indices,
DoubleList dList)
|
double |
getLogScoreFor(Sequence seq,
int start)
|
abstract double |
getLogScoreFor(Sequence seq,
int startpos,
int endpos)
|
clone, emitDataSet, getInitialClassParam, getLogProbFor, getLogProbFor, getLogProbFor, getLogScoreFor, getLogScoreFor, getMaximalMarkovOrder, isNormalized, isNormalizedfromXML, getAlphabetContainer, getCharacteristics, getLength, getLogScoreAndPartialDerivation, getLogScoreFor, getNumberOfRecommendedStarts, getNumberOfStarts, getNumericalCharacteristics, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLogNormalizationConstant, getLogPartialNormalizationConstant, setStatisticForHyperparametersaddGradientOfLogPriorTerm, getESS, getLogPriorTerm, getSizeOfEventSpaceForRandomVariablesOfParameter, isNormalizedclone, getCurrentParameterValues, getInitialClassParam, getLogScoreAndPartialDerivation, getNumberOfParameters, getNumberOfRecommendedStarts, initializeFunction, initializeFunctionRandomly, setParametersemitDataSet, getLogProbFor, getLogProbFor, getLogProbFor, getMaximalMarkovOrdergetAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized, toStringprotected AbstractVariableLengthDiffSM(AlphabetContainer alphabets)
VariableLengthDiffSM that models sequences of arbitrary
length.alphabets - the AlphabetContainer of this
VariableLengthDiffSMAbstractVariableLengthDiffSM(AlphabetContainer,
int)protected AbstractVariableLengthDiffSM(AlphabetContainer alphabets, int length)
VariableLengthDiffSM that models sequences of a given
length.alphabets - the AlphabetContainer of this
VariableLengthDiffSMlength - the length of the modeled sequencesprotected AbstractVariableLengthDiffSM(StringBuffer source) throws NonParsableException
Storable.
Creates a new VariableLengthDiffSM out of its XML
representation.source - the XML representation as StringBufferNonParsableException - if the XML representation could not be parsed.public double getLogNormalizationConstant()
DifferentiableStatisticalModelgetLogNormalizationConstant in interface DifferentiableStatisticalModelpublic double getLogPartialNormalizationConstant(int parameterIndex)
throws Exception
DifferentiableStatisticalModelparameterIndex. This is the logarithm of the partial derivation of the
normalization constant for the parameter with index
parameterIndex,
![\[\log \frac{\partial Z(\underline{\lambda})}{\partial \lambda_{parameterindex}}\]](images/DifferentiableStatisticalModel_LaTeXilb9_1.png)
getLogPartialNormalizationConstant in interface DifferentiableStatisticalModelparameterIndex - the index of the parameterException - if something went wrong with the normalizationDifferentiableStatisticalModel.getLogNormalizationConstant()public double getLogScoreFor(Sequence seq, int start)
SequenceScoregetLogScoreFor in interface SequenceScoreseq - the Sequencestart - the start position in the SequenceSequencepublic double getLogScoreAndPartialDerivation(Sequence seq, int start, IntList indices, DoubleList dList)
DifferentiableSequenceScoreSequence beginning at
position start in the Sequence and fills lists with
the indices and the partial derivations.getLogScoreAndPartialDerivation in interface DifferentiableSequenceScoreseq - the Sequencestart - the start position in the Sequenceindices - an IntList of indices, after method invocation the
list should contain the indices i where
is not zerodList - a DoubleList of partial derivations, after method
invocation the list should contain the corresponding
that are not zeroSequencepublic abstract double getLogScoreFor(Sequence seq, int startpos, int endpos)
SequenceScoregetLogScoreFor in interface SequenceScoregetLogScoreFor in interface VariableLengthDiffSMgetLogScoreFor in class AbstractDifferentiableSequenceScoreseq - the Sequencestartpos - the start position in the Sequenceendpos - the end position (inclusive) in the SequenceSequencepublic abstract double 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 DifferentiableSequenceScoregetLogScoreAndPartialDerivation in interface VariableLengthDiffSMgetLogScoreAndPartialDerivation in class AbstractDifferentiableSequenceScoreseq - 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 zeroSequence