|
||||||||||
| 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.mixture.motif.PositionDiffSM
de.jstacs.sequenceScores.statisticalModels.differentiable.mixture.motif.DurationDiffSM
public abstract class DurationDiffSM
This class is the super class for all one dimensional position scoring functions that can be used as durations for semi Markov models.
ExtendedZOOPSDiffSM| Field Summary | |
|---|---|
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. |
| Fields inherited from class de.jstacs.sequenceScores.statisticalModels.differentiable.mixture.motif.PositionDiffSM |
|---|
internal |
| 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 |
DurationDiffSM(int min,
int max,
double ess)
The default constructor. |
protected |
DurationDiffSM(StringBuffer source)
This is the constructor for Storable. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class de.jstacs.sequenceScores.statisticalModels.differentiable.mixture.motif.PositionDiffSM |
|---|
clone, getInternalPosition, getLogScore, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivationForInternal, getLogScoreFor, getLogScoreForInternal, getValuesFromSequence |
| Methods inherited from class de.jstacs.sequenceScores.statisticalModels.differentiable.AbstractDifferentiableStatisticalModel |
|---|
emitDataSet, getInitialClassParam, getLogProbFor, getLogProbFor, getLogProbFor, getLogScoreFor, getLogScoreFor, getMaximalMarkovOrder, isNormalized, isNormalized |
| Methods inherited from class de.jstacs.sequenceScores.differentiable.AbstractDifferentiableSequenceScore |
|---|
getAlphabetContainer, getCharacteristics, getLength, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getLogScoreFor, 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.DifferentiableStatisticalModel |
|---|
addGradientOfLogPriorTerm, getLogPriorTerm |
| Methods inherited from interface de.jstacs.sequenceScores.differentiable.DifferentiableSequenceScore |
|---|
getCurrentParameterValues, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getNumberOfParameters, getNumberOfRecommendedStarts, initializeFunction, initializeFunctionRandomly, setParameters |
| Methods inherited from interface de.jstacs.sequenceScores.SequenceScore |
|---|
getAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized |
| Field Detail |
|---|
protected double ess
protected int min
protected int max
protected int delta
| Constructor Detail |
|---|
protected DurationDiffSM(int min,
int max,
double ess)
min - the minimal valuemax - the maximal valueess - the equivalent sample size
protected DurationDiffSM(StringBuffer source)
throws NonParsableException
Storable. Creates a new
DurationDiffSM out of a StringBuffer.
source - the XML representation as StringBuffer
NonParsableException - if the XML representation could not be parsed| Method Detail |
|---|
public StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.
toXML in interface StorabletoXML in class PositionDiffSM
protected void fromXML(StringBuffer xml)
throws NonParsableException
AbstractDifferentiableSequenceScoreStorable
interface to create a scoring function from a StringBuffer.
fromXML in class PositionDiffSMxml - the XML representation as StringBuffer
NonParsableException - if the StringBuffer could not be parsedAbstractDifferentiableSequenceScore.AbstractDifferentiableSequenceScore(StringBuffer)public void reset()
PositionDiffSM
reset in class PositionDiffSMpublic boolean next()
PositionDiffSM
next 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 parameter
public final double getESS()
DifferentiableStatisticalModel
public boolean isPossible(int... positions)
PositionDiffSMtrue if the given positions are in the domain of the
PositionDiffSM.
isPossible in class PositionDiffSMpositions - the positions to be tested
true 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()
DifferentiableStatisticalModel
public 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 parameter
Exception - 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 null
REnvironmentpublic String toString(NumberFormat nf)
SequenceScoreString representation of the instance.
nf - the NumberFormat for the String representation of parameters or probabilities
String representation of the instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||