public abstract class DurationDiffSM extends PositionDiffSM
ExtendedZOOPSDiffSM| Modifier and Type | Field and Description |
|---|---|
protected int |
delta
The difference of maximal and minimal value.
|
protected double |
ess
The equivalent sample size.
|
protected int |
max
The maximal value.
|
protected int |
min
The minimal value.
|
internalalphabets, length, rUNKNOWN| Modifier | Constructor and Description |
|---|---|
protected |
DurationDiffSM(int min,
int max,
double ess)
The default constructor.
|
protected |
DurationDiffSM(StringBuffer source)
This is the constructor for
Storable. |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
adjust(int[] length,
double[] weight)
This method adjust the parameter based on the given statistic.
|
protected void |
fromXML(StringBuffer xml)
This method is called in the constructor for the
Storable
interface to create a scoring function from a StringBuffer. |
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. |
int |
getMax()
Returns the maximal value that can be scored.
|
int |
getMin()
Returns the minimal value that can be scored.
|
int |
getNumberOfPossibilities()
Returns the number of different possibilities that can be scored.
|
protected abstract String |
getRNotation(String distributionName,
NumberFormat nf)
This method returns the distribution in R notation.
|
int |
getSizeOfEventSpaceForRandomVariablesOfParameter(int index)
Returns the size of the event space of the random variables that are
affected by parameter no.
|
abstract void |
initializeUniformly()
This method set special parameters that lead to an uniform distribution.
|
boolean |
isPossible(int... positions)
This method returns
true if the given positions are in the domain of the
PositionDiffSM. |
void |
modify(int delta)
This method modifies the underlying
AlphabetContainer. |
boolean |
next()
This method steps to the next reasonable outcome if possible.
|
void |
reset()
This method resets the iterator to the initial state (first reasonable output) so that it can be used again.
|
String |
toString(NumberFormat nf)
This method returns a
String representation of the instance. |
StringBuffer |
toXML()
This method returns an XML representation as
StringBuffer of an
instance of the implementing class. |
clone, getInternalPosition, getLogScore, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivationForInternal, getLogScoreFor, getLogScoreForInternal, getValuesFromSequenceemitDataSet, getInitialClassParam, getLogProbFor, getLogProbFor, getLogProbFor, getLogScoreFor, getLogScoreFor, getMaximalMarkovOrder, isNormalized, isNormalizedgetAlphabetContainer, getCharacteristics, getLength, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getLogScoreFor, getLogScoreFor, getNumberOfRecommendedStarts, getNumberOfStarts, getNumericalCharacteristics, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddGradientOfLogPriorTerm, getLogPriorTermgetCurrentParameterValues, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getNumberOfParameters, getNumberOfRecommendedStarts, initializeFunction, initializeFunctionRandomly, setParametersgetAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitializedprotected double ess
protected int min
protected int max
protected int delta
protected DurationDiffSM(int min,
int max,
double ess)
min - the minimal valuemax - the maximal valueess - the equivalent sample sizeprotected DurationDiffSM(StringBuffer source) throws NonParsableException
source - the XML representation as StringBufferNonParsableException - if the XML representation could not be parsedpublic StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.toXML in interface StorabletoXML in class PositionDiffSMprotected void fromXML(StringBuffer xml) throws NonParsableException
AbstractDifferentiableSequenceScoreStorable
interface to create a scoring function from a StringBuffer.fromXML in class PositionDiffSMxml - the XML representation as StringBufferNonParsableException - if the StringBuffer could not be parsedAbstractDifferentiableSequenceScore.AbstractDifferentiableSequenceScore(StringBuffer)public void reset()
PositionDiffSMreset in class PositionDiffSMpublic boolean next()
PositionDiffSMnext in class PositionDiffSMtrue if a next reasonable outcome could be set, otherwise falsepublic int getSizeOfEventSpaceForRandomVariablesOfParameter(int index)
DifferentiableStatisticalModelindex, 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 parameterpublic final double getESS()
DifferentiableStatisticalModelpublic boolean isPossible(int... positions)
PositionDiffSMtrue if the given positions are in the domain of the
PositionDiffSM.isPossible in class PositionDiffSMpositions - the positions to be testedtrue if the given positions are in the domain of the
PositionDiffSMpublic final int getMin()
public final int getMax()
public int getNumberOfPossibilities()
public abstract void initializeUniformly()
public abstract void adjust(int[] length,
double[] weight)
length - an array containing length valuesweight - an array containing corresponding weight valuespublic void modify(int delta)
AlphabetContainer. This might be necessary if the motif length changed.delta - the changeMutable.modify(int, int),
MutableMotifDiscoverer.modifyMotif(int, int, int)public final double getLogNormalizationConstant()
DifferentiableStatisticalModelpublic final 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)
parameterIndex - the index of the parameterException - if something went wrong with the normalizationDifferentiableStatisticalModel.getLogNormalizationConstant()protected abstract String getRNotation(String distributionName, NumberFormat nf)
distributionName - the name of the distribution, e.g., "p"nf - the NumberFormat to be used, can be nullREnvironmentpublic String toString(NumberFormat nf)
SequenceScoreString representation of the instance.nf - the NumberFormat for the String representation of parameters or probabilitiesString representation of the instance