|
||||||||||
| 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.directedGraphicalModels.BayesianNetworkDiffSM
de.jstacs.sequenceScores.statisticalModels.differentiable.directedGraphicalModels.MarkovModelDiffSM
public class MarkovModelDiffSM
This class implements a AbstractDifferentiableStatisticalModel for an inhomogeneous Markov model.
The modeled length can be modified which might be very important for de-novo motif discovery.
| Field Summary |
|---|
| Fields inherited from class de.jstacs.sequenceScores.statisticalModels.differentiable.directedGraphicalModels.BayesianNetworkDiffSM |
|---|
ess, isTrained, logNormalizationConstant, numFreePars, nums, order, parameters, plugInParameters, structureMeasure, trees |
| Fields inherited from class de.jstacs.sequenceScores.differentiable.AbstractDifferentiableSequenceScore |
|---|
alphabets, length, r |
| Fields inherited from interface de.jstacs.sequenceScores.differentiable.DifferentiableSequenceScore |
|---|
UNKNOWN |
| Constructor Summary | |
|---|---|
MarkovModelDiffSM(AlphabetContainer alphabet,
int length,
double ess,
boolean plugInParameters,
InhomogeneousMarkov structureMeasure)
This constructor creates an instance without any prior for the modeled length. |
|
MarkovModelDiffSM(AlphabetContainer alphabet,
int length,
double ess,
boolean plugInParameters,
InhomogeneousMarkov structureMeasure,
DurationDiffSM lengthPenalty)
This constructor creates an instance with an prior for the modeled length. |
|
MarkovModelDiffSM(AlphabetContainer alphabet,
int length,
double ess,
boolean plugInParameters,
int order,
DurationDiffSM lengthPenalty)
This constructor creates an instance with an prior for the modeled length. |
|
MarkovModelDiffSM(StringBuffer xml)
The standard constructor for the interface Storable. |
|
| Method Summary | |
|---|---|
protected void |
fromXML(StringBuffer source)
This method is called in the constructor for the Storable
interface to create a scoring function from a StringBuffer. |
double |
getLogPriorTerm()
This method computes a value that is proportional to |
int |
getOrder()
Returns the order of the inhomogeneous Markov model. |
int[][] |
getSamplingGroups(int parameterOffset)
Returns groups of indexes of parameters that shall be drawn together in a sampling procedure |
boolean |
modify(int offsetLeft,
int offsetRight)
Manually modifies the model. |
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.directedGraphicalModels.BayesianNetworkDiffSM |
|---|
addGradientOfLogPriorTerm, clone, createTrees, emitDataSet, getCurrentParameterSet, getCurrentParameterValues, getESS, getInstanceName, getLogNormalizationConstant, getLogPartialNormalizationConstant, getLogScoreAndPartialDerivation, getLogScoreFor, getMaximalMarkovOrder, getMaximumScore, getNumberOfParameters, getPositionDependentKMerProb, getPositionForParameter, getPWM, getSizeOfEventSpaceForRandomVariablesOfParameter, initializeFunction, initializeFunctionRandomly, isInitialized, precomputeNormalization, setParameters, setPlugInParameters, toHtml, toString |
| Methods inherited from class de.jstacs.sequenceScores.statisticalModels.differentiable.AbstractDifferentiableStatisticalModel |
|---|
getInitialClassParam, getLogProbFor, getLogProbFor, getLogProbFor, getLogScoreFor, getLogScoreFor, 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, getESS, getLogNormalizationConstant, getLogPartialNormalizationConstant, getSizeOfEventSpaceForRandomVariablesOfParameter, isNormalized |
| Methods inherited from interface de.jstacs.sequenceScores.differentiable.DifferentiableSequenceScore |
|---|
clone, getCurrentParameterValues, getInitialClassParam, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getLogScoreAndPartialDerivation, getNumberOfParameters, getNumberOfRecommendedStarts, initializeFunction, initializeFunctionRandomly, setParameters |
| Methods inherited from interface de.jstacs.sequenceScores.statisticalModels.StatisticalModel |
|---|
emitDataSet, getLogProbFor, getLogProbFor, getLogProbFor, getMaximalMarkovOrder |
| Methods inherited from interface de.jstacs.sequenceScores.SequenceScore |
|---|
getAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized, toString |
| Constructor Detail |
|---|
public MarkovModelDiffSM(AlphabetContainer alphabet,
int length,
double ess,
boolean plugInParameters,
int order,
DurationDiffSM lengthPenalty)
throws Exception
alphabet - the AlphabetContainer of the MarkovModelDiffSMlength - the initial length of the modeled sequencesess - the equivalent sample sizeplugInParameters - a switch whether to use plug-in parameters of notorder - the order of the Markov modellengthPenalty - the prior on the modeled sequence length
Exception - if super class constructor throws an Exception or if the lengthPenalty does not allow the initial length
public MarkovModelDiffSM(AlphabetContainer alphabet,
int length,
double ess,
boolean plugInParameters,
InhomogeneousMarkov structureMeasure)
throws Exception
alphabet - the AlphabetContainer of the MarkovModelDiffSMlength - the initial length of the modeled sequencesess - the equivalent sample sizeplugInParameters - a switch whether to use plug-in parameters of notstructureMeasure - an InhomogeneousMarkov Measure for the structure
Exception - if super class constructor throws an Exception
public MarkovModelDiffSM(AlphabetContainer alphabet,
int length,
double ess,
boolean plugInParameters,
InhomogeneousMarkov structureMeasure,
DurationDiffSM lengthPenalty)
throws Exception
alphabet - the AlphabetContainer of the MarkovModelDiffSMlength - the initial length of the modeled sequencesess - the equivalent sample sizeplugInParameters - a switch whether to use plug-in parameters of notstructureMeasure - a InhomogeneousMarkov Measure for the structurelengthPenalty - the prior on the modeled sequence length
Exception - if super class constructor throws an Exception or if the lengthPenalty does not allow the initial length
public MarkovModelDiffSM(StringBuffer xml)
throws NonParsableException
Storable.
Recreates a MarkovModelDiffSM from its XML
representation as saved by the method toXML().
xml - the XML representation as StringBuffer
NonParsableException - if the XML code could not be parsed| Method Detail |
|---|
protected void fromXML(StringBuffer source)
throws NonParsableException
AbstractDifferentiableSequenceScoreStorable
interface to create a scoring function from a StringBuffer.
fromXML in class BayesianNetworkDiffSMsource - the XML representation as StringBuffer
NonParsableException - if the StringBuffer could not be parsedAbstractDifferentiableSequenceScore.AbstractDifferentiableSequenceScore(StringBuffer)public StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.
toXML in interface StorabletoXML in class BayesianNetworkDiffSMpublic double getLogPriorTerm()
DifferentiableStatisticalModel
DifferentiableStatisticalModel.getESS() * DifferentiableStatisticalModel.getLogNormalizationConstant() + Math.log( prior )
prior is the prior for the parameters of this model.
getLogPriorTerm in interface DifferentiableStatisticalModelgetLogPriorTerm in interface StatisticalModelgetLogPriorTerm in class BayesianNetworkDiffSMDifferentiableStatisticalModel.getESS() * DifferentiableStatisticalModel.getLogNormalizationConstant() + Math.log( prior ).DifferentiableStatisticalModel.getESS(),
DifferentiableStatisticalModel.getLogNormalizationConstant()public int getOrder()
public boolean modify(int offsetLeft,
int offsetRight)
MutableoffsetLeft
and offsetRight define how many positions the left or
right border positions shall be moved. Negative numbers indicate moves to
the left while positive numbers correspond to moves to the right.
modify in interface MutableoffsetLeft - the offset on the left sideoffsetRight - the offset on the right side
true if the motif model was modified otherwise
falsepublic int[][] getSamplingGroups(int parameterOffset)
SamplingDifferentiableStatisticalModel
getSamplingGroups in interface SamplingDifferentiableStatisticalModelparameterOffset - a global offset on the parameter indexes
parameterOffset.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||