|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.sequenceScores.differentiable.AbstractDifferentiableSequenceScore
de.jstacs.sequenceScores.statisticalModels.differentiable.AbstractDifferentiableStatisticalModel
de.jstacs.sequenceScores.statisticalModels.differentiable.AbstractVariableLengthDiffSM
public abstract class AbstractVariableLengthDiffSM
This abstract class implements some methods declared in 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.
| Field Summary |
|---|
| Fields inherited from class de.jstacs.sequenceScores.differentiable.AbstractDifferentiableSequenceScore |
|---|
alphabets, length, r |
| Fields inherited from interface de.jstacs.sequenceScores.differentiable.DifferentiableSequenceScore |
|---|
UNKNOWN |
| Constructor Summary | |
|---|---|
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. |
| Method Summary | |
|---|---|
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)
Returns the logarithmic score for a Sequence beginning at
position start in the Sequence and fills lists with
the indices and the partial derivations. |
double |
getLogScoreAndPartialDerivation(Sequence seq,
int start,
IntList indices,
DoubleList dList)
Returns the logarithmic score for a Sequence beginning at
position start in the Sequence and fills lists with
the indices and the partial derivations. |
double |
getLogScoreFor(Sequence seq,
int start)
Returns the logarithmic score for the Sequence seq
beginning at position start in the Sequence. |
abstract double |
getLogScoreFor(Sequence seq,
int startpos,
int endpos)
Returns the logarithmic score for the Sequence seq
beginning at position start in the Sequence. |
| Methods inherited from class de.jstacs.sequenceScores.statisticalModels.differentiable.AbstractDifferentiableStatisticalModel |
|---|
clone, emitDataSet, getInitialClassParam, getLogProbFor, getLogProbFor, getLogProbFor, getLogScoreFor, getLogScoreFor, getMaximalMarkovOrder, isNormalized, isNormalized |
| Methods inherited from class de.jstacs.sequenceScores.differentiable.AbstractDifferentiableSequenceScore |
|---|
fromXML, getAlphabetContainer, getCharacteristics, getLength, getLogScoreAndPartialDerivation, getLogScoreFor, getNumberOfRecommendedStarts, getNumberOfStarts, getNumericalCharacteristics |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.jstacs.sequenceScores.statisticalModels.differentiable.VariableLengthDiffSM |
|---|
getLogNormalizationConstant, getLogPartialNormalizationConstant, setStatisticForHyperparameters |
| Methods inherited from interface de.jstacs.sequenceScores.statisticalModels.differentiable.DifferentiableStatisticalModel |
|---|
addGradientOfLogPriorTerm, getESS, getLogPriorTerm, getSizeOfEventSpaceForRandomVariablesOfParameter, isNormalized |
| Methods inherited from interface de.jstacs.sequenceScores.differentiable.DifferentiableSequenceScore |
|---|
clone, getCurrentParameterValues, getInitialClassParam, getLogScoreAndPartialDerivation, getNumberOfParameters, getNumberOfRecommendedStarts, initializeFunction, initializeFunctionRandomly, setParameters |
| Methods inherited from interface de.jstacs.sequenceScores.statisticalModels.StatisticalModel |
|---|
emitDataSet, getLogProbFor, getLogProbFor, getLogProbFor, getMaximalMarkovOrder |
| Methods inherited from interface de.jstacs.sequenceScores.SequenceScore |
|---|
getAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized |
| Methods inherited from interface de.jstacs.Storable |
|---|
toXML |
| Constructor Detail |
|---|
protected 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 sequences
protected AbstractVariableLengthDiffSM(StringBuffer source)
throws NonParsableException
Storable.
Creates a new VariableLengthDiffSM out of its XML
representation.
source - the XML representation as StringBuffer
NonParsableException - if the XML representation could not be parsed.| Method Detail |
|---|
public double getLogNormalizationConstant()
DifferentiableStatisticalModel
getLogNormalizationConstant in interface DifferentiableStatisticalModel
public 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_LaTeXilb8_1.png)
getLogPartialNormalizationConstant in interface DifferentiableStatisticalModelparameterIndex - the index of the parameter
Exception - if something went wrong with the normalizationDifferentiableStatisticalModel.getLogNormalizationConstant()
public double getLogScoreFor(Sequence seq,
int start)
SequenceScoreSequence seq
beginning at position start in the Sequence.
getLogScoreFor in interface SequenceScoreseq - the Sequencestart - the start position in the Sequence
Sequence
public 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 zero
Sequence
public abstract double getLogScoreFor(Sequence seq,
int startpos,
int endpos)
SequenceScoreSequence seq
beginning at position start in the Sequence.
getLogScoreFor in interface SequenceScoregetLogScoreFor in interface VariableLengthDiffSMgetLogScoreFor in class AbstractDifferentiableSequenceScoreseq - the Sequencestartpos - the start position in the Sequenceendpos - the end position (inclusive) in the Sequence
Sequence
public 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 zero
Sequence
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||