public class VariableLengthMixtureDiffSM extends MixtureDiffSM implements VariableLengthDiffSM
VariableLengthDiffSM
by extending MixtureDiffSM
and implementing the methods of VariableLengthDiffSM
.MotifDiscoverer.KindOfProfile
componentScore, dList, freeParams, function, hiddenParameter, hiddenPotential, iList, logGammaSum, logHiddenNorm, logHiddenPotential, norm, optimizeHidden, paramRef, partNorm
alphabets, length, r
UNKNOWN
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, toString
addGradientOfLogPriorTerm, 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, toXML
getInitialClassParam, getLogProbFor, getLogProbFor, getLogProbFor, getLogScoreFor, getLogScoreFor, getMaximalMarkovOrder, isNormalized
getAlphabetContainer, getCharacteristics, getLength, getLogScoreAndPartialDerivation, getLogScoreFor, getNumberOfStarts, getNumericalCharacteristics, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addGradientOfLogPriorTerm, getESS, getLogNormalizationConstant, getLogPartialNormalizationConstant, getLogPriorTerm, getSizeOfEventSpaceForRandomVariablesOfParameter, isNormalized
clone, getCurrentParameterValues, getInitialClassParam, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getNumberOfParameters, getNumberOfRecommendedStarts, initializeFunction, initializeFunctionRandomly, setParameters
emitDataSet, getLogProbFor, getLogProbFor, getLogProbFor, getMaximalMarkovOrder
getAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized, toString
getNumberOfComponents
public 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 VariableLengthDiffSM
sCloneNotSupportedException
- 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 StringBuffer
NonParsableException
- if the XML representation could not be parsedpublic double getLogScoreFor(Sequence seq, int start, int end)
SequenceScore
getLogScoreFor
in interface SequenceScore
getLogScoreFor
in interface VariableLengthDiffSM
getLogScoreFor
in class AbstractDifferentiableSequenceScore
seq
- the Sequence
start
- the start position in the Sequence
end
- the end position (inclusive) in the Sequence
Sequence
public double getLogScoreAndPartialDerivation(Sequence seq, int start, int end, IntList indices, DoubleList partialDer)
DifferentiableSequenceScore
Sequence
beginning at
position start
in the Sequence
and fills lists with
the indices and the partial derivations.getLogScoreAndPartialDerivation
in interface DifferentiableSequenceScore
getLogScoreAndPartialDerivation
in interface VariableLengthDiffSM
getLogScoreAndPartialDerivation
in class AbstractDifferentiableSequenceScore
seq
- the Sequence
start
- the start position in the Sequence
end
- the end position (inclusive) in the Sequence
indices
- an IntList
of indices, after method invocation the
list should contain the indices i where
partialDer
- a DoubleList
of partial derivations, after method
invocation the list should contain the corresponding
Sequence
public double getLogNormalizationConstant(int length)
VariableLengthDiffSM
getLogNormalizationConstant
in interface VariableLengthDiffSM
length
- the sequence lengthDifferentiableStatisticalModel.getLogNormalizationConstant()
public double getLogPartialNormalizationConstant(int parameterIndex, int length) throws Exception
VariableLengthDiffSM
getLogPartialNormalizationConstant
in interface VariableLengthDiffSM
parameterIndex
- the index of the parameterlength
- the sequence lengthException
- if something went wrongDifferentiableStatisticalModel.getLogPartialNormalizationConstant(int)
public void setStatisticForHyperparameters(int[] length, double[] weight) throws Exception
VariableLengthDiffSM
length
) and how often (
weight
) they have been seen.setStatisticForHyperparameters
in interface VariableLengthDiffSM
length
- the non-negative lengths of the sequencesweight
- the non-negative weight for the corresponding sequenceException
- if something went wrongMutable