public class VariableLengthMixtureDiffSM extends MixtureDiffSM implements VariableLengthDiffSM
VariableLengthDiffSM by extending MixtureDiffSM and implementing the methods of VariableLengthDiffSM.MotifDiscoverer.KindOfProfilecomponentScore, dList, freeParams, function, hiddenParameter, hiddenPotential, iList, logGammaSum, logHiddenNorm, logHiddenPotential, norm, optimizeHidden, paramRef, partNormalphabets, length, rUNKNOWN| Constructor and Description |
|---|
VariableLengthMixtureDiffSM(int starts,
boolean plugIn,
VariableLengthDiffSM... component)
This constructor creates a new
VariableLengthMixtureDiffSM. |
VariableLengthMixtureDiffSM(StringBuffer xml)
This is the constructor for the interface
Storable. |
| Modifier and Type | Method and Description |
|---|---|
double |
getLogNormalizationConstant(int length)
This method returns the logarithm of the normalization constant for a given sequence
length.
|
double |
getLogPartialNormalizationConstant(int parameterIndex,
int length)
This method returns the logarithm of the partial normalization constant for a given
parameter index and a sequence length.
|
double |
getLogScoreAndPartialDerivation(Sequence seq,
int start,
int end,
IntList indices,
DoubleList partialDer)
|
double |
getLogScoreFor(Sequence seq,
int start,
int end)
|
void |
setStatisticForHyperparameters(int[] length,
double[] weight)
This method sets the hyperparameters for the model parameters by
evaluating the given statistic.
|
adjustHiddenParameters, clone, emitDataSet, fillComponentScores, getESS, getGlobalIndexOfMotifInComponent, getHyperparameterForHiddenParameter, getIndexOfMaximalComponentFor, getInstanceName, getLogNormalizationConstantForComponent, getLogPartialNormalizationConstant, getLogScoreAndPartialDerivation, getMotifLength, getNumberOfMotifs, getNumberOfMotifsInComponent, getProfileOfScoresFor, getStrandProbabilitiesFor, initializeMotif, initializeMotifRandomly, initializeUsingPlugIn, modifyMotif, toStringaddGradientOfLogPriorTerm, cloneFunctions, computeHiddenParameter, computeLogGammaSum, determineIsNormalized, extractFurtherInformation, fromXML, getAPrioriMixtureProbabilities, getComponentScores, getCurrentParameterValues, getDifferentiableStatisticalModels, getFunction, getFunctions, getFurtherInformation, getIndexOfMaximalComponentFor, getIndices, getLogNormalizationConstant, getLogPriorTerm, getLogScoreFor, getNumberOfComponents, getNumberOfParameters, getNumberOfRecommendedStarts, getProbsForComponent, getSamplingGroups, getSizeOfEventSpaceForRandomVariablesOfParameter, getXMLTag, init, initializeFunction, initializeFunctionRandomly, initializeHiddenPotentialRandomly, initializeHiddenUniformly, initWithLength, isInitialized, isNormalized, precomputeNorm, setHiddenParameters, setParameters, setParametersForFunction, toXMLgetInitialClassParam, getLogProbFor, getLogProbFor, getLogProbFor, getLogScoreFor, getLogScoreFor, getMaximalMarkovOrder, isNormalizedgetAlphabetContainer, getCharacteristics, getLength, getLogScoreAndPartialDerivation, getLogScoreFor, getNumberOfStarts, getNumericalCharacteristics, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddGradientOfLogPriorTerm, getESS, getLogNormalizationConstant, getLogPartialNormalizationConstant, getLogPriorTerm, getSizeOfEventSpaceForRandomVariablesOfParameter, isNormalizedclone, getCurrentParameterValues, getInitialClassParam, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getNumberOfParameters, getNumberOfRecommendedStarts, initializeFunction, initializeFunctionRandomly, setParametersemitDataSet, getLogProbFor, getLogProbFor, getLogProbFor, getMaximalMarkovOrdergetAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized, toStringgetNumberOfComponentspublic VariableLengthMixtureDiffSM(int starts,
boolean plugIn,
VariableLengthDiffSM... component)
throws CloneNotSupportedException
VariableLengthMixtureDiffSM.starts - the number of starts that should be done in an optimizationplugIn - indicates whether the initial parameters for an optimization
should be related to the data or randomly drawncomponent - the VariableLengthDiffSMsCloneNotSupportedException - if an element of component could not be clonedpublic VariableLengthMixtureDiffSM(StringBuffer xml) throws NonParsableException
Storable.
Creates a new VariableLengthMixtureDiffSM out of a
StringBuffer.xml - the XML representation as StringBufferNonParsableException - if the XML representation could not be parsedpublic double getLogScoreFor(Sequence seq, int start, int end)
SequenceScoregetLogScoreFor in interface SequenceScoregetLogScoreFor in interface VariableLengthDiffSMgetLogScoreFor in class AbstractDifferentiableSequenceScoreseq - the Sequencestart - the start position in the Sequenceend - the end position (inclusive) in the SequenceSequencepublic double getLogScoreAndPartialDerivation(Sequence seq, int start, int end, 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 Sequencestart - the start position in the Sequenceend - 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 zeroSequencepublic double getLogNormalizationConstant(int length)
VariableLengthDiffSMgetLogNormalizationConstant in interface VariableLengthDiffSMlength - the sequence lengthDifferentiableStatisticalModel.getLogNormalizationConstant()public double getLogPartialNormalizationConstant(int parameterIndex,
int length)
throws Exception
VariableLengthDiffSMgetLogPartialNormalizationConstant in interface VariableLengthDiffSMparameterIndex - the index of the parameterlength - the sequence lengthException - if something went wrongDifferentiableStatisticalModel.getLogPartialNormalizationConstant(int)public void setStatisticForHyperparameters(int[] length,
double[] weight)
throws Exception
VariableLengthDiffSMlength) and how often (
weight) they have been seen.setStatisticForHyperparameters in interface VariableLengthDiffSMlength - the non-negative lengths of the sequencesweight - the non-negative weight for the corresponding sequenceException - if something went wrongMutable