public interface DifferentiableStatisticalModel extends DifferentiableSequenceScore, StatisticalModel
DifferentiableSequenceScore
s.
For creating simple differentiable statistical models please check DifferentiableStatisticalModelFactory
.DifferentiableStatisticalModelFactory
UNKNOWN
Modifier and Type | Method and Description |
---|---|
void |
addGradientOfLogPriorTerm(double[] grad,
int start)
This method computes the gradient of
getLogPriorTerm() for each
parameter of this model. |
double |
getESS()
Returns the equivalent sample size (ess) of this model, i.e.
|
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 . |
double |
getLogPriorTerm()
This method computes a value that is proportional to
|
int |
getSizeOfEventSpaceForRandomVariablesOfParameter(int index)
Returns the size of the event space of the random variables that are
affected by parameter no.
|
boolean |
isNormalized()
This method indicates whether the implemented score is already normalized
to 1 or not.
|
clone, getCurrentParameterValues, getInitialClassParam, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getNumberOfParameters, getNumberOfRecommendedStarts, initializeFunction, initializeFunctionRandomly, setParameters
emitDataSet, getLogProbFor, getLogProbFor, getLogProbFor, getMaximalMarkovOrder
getAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized, toString
int getSizeOfEventSpaceForRandomVariablesOfParameter(int index)
index
, i.e. the product of the
sizes of the alphabets at the position of each random variable affected
by parameter index
. For DNA alphabets this corresponds to 4
for a PWM, 16 for a WAM except position 0, ...index
- the index of the parameterdouble getLogNormalizationConstant()
double getLogPartialNormalizationConstant(int parameterIndex) throws Exception
parameterIndex
. This is the logarithm of the partial derivation of the
normalization constant for the parameter with index
parameterIndex
,
parameterIndex
- the index of the parameterException
- if something went wrong with the normalizationgetLogNormalizationConstant()
double getLogPriorTerm()
getESS()
* getLogNormalizationConstant()
+ Math.log( prior )
prior
is the prior for the parameters of this model.getLogPriorTerm
in interface StatisticalModel
getESS()
* getLogNormalizationConstant()
+ Math.log( prior ).
getESS()
,
getLogNormalizationConstant()
void addGradientOfLogPriorTerm(double[] grad, int start) throws Exception
getLogPriorTerm()
for each
parameter of this model. The results are added to the array
grad
beginning at index start
.grad
- the array of gradientsstart
- the start index in the grad
array, where the
partial derivations for the parameters of this models shall be
enteredException
- if something went wrong with the computing of the gradientsgetLogPriorTerm()
boolean isNormalized()
false
.true
if the implemented score is already normalized
to 1, false
otherwisedouble getESS()