|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NormalizableScoringFunction
The interface for normalizable ScoringFunctions.
Field Summary |
---|
Fields inherited from interface de.jstacs.scoringFunctions.ScoringFunction |
---|
UNKNOWN |
Method Summary | |
---|---|
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 of this model, i.e. the equivalent sample size for the class or component that is represented by this model. |
double |
getInitialClassParam(double classProb)
Returns the initial class parameter for the class this ScoringFunction is responsible for, based on the probability classProb . |
double |
getLogPriorTerm()
This method computes a value that is proportional to getESS()*Math.log( getNormalizationConstant() ) + Math.log( prior ). |
double |
getNormalizationConstant()
Returns the sum of the scores over all sequences of the event space. |
double |
getPartialNormalizationConstant(int parameterIndex)
Returns the partial normalization constant for the parameter with index parameterIndex . |
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 returns whether the implemented score is already normalized to 1. |
Methods inherited from interface de.jstacs.scoringFunctions.ScoringFunction |
---|
clone, getAlphabetContainer, getCurrentParameterValues, getInstanceName, getLength, getLogScore, getLogScore, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getNumberOfParameters, getNumberOfRecommendedStarts, initializeFunction, initializeFunctionRandomly, isInitialized, setParameters |
Methods inherited from interface de.jstacs.Storable |
---|
toXML |
Method Detail |
---|
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 parameter
double getNormalizationConstant()
double getPartialNormalizationConstant(int parameterIndex) throws Exception
parameterIndex
. This is
the partial derivation of the normalization constant for the parameter with index parameterIndex
\frac{\partial Z(\lambda)}{\partial \lambda_{index}}
.
parameterIndex
- the index of the parameter
Exception
- if something went wrong with the Normalizationdouble getEss()
double getLogPriorTerm()
getESS()*Math.log( getNormalizationConstant() ) + Math.log( prior ).
prior is the prior for the parameters of this model.
- Returns:
getESS()*Math.log( getNormalizationConstant() ) + Math.log( prior )
- See Also:
getEss()
,
getNormalizationConstant()
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 gradientstart
- the start index in the grad
array, where the partial derivations for the parameters of
this models shall be enter
Exception
getLogPriorTerm()
boolean isNormalized()
false
.
double getInitialClassParam(double classProb)
ScoringFunction
ScoringFunction
is responsible for, based on the probability classProb
.
getInitialClassParam
in interface ScoringFunction
classProb
- the class probability
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |