Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.sequenceScores.statisticalModels.differentiable
Interface VariableLengthDiffSM

All Superinterfaces:
  Cloneable, DifferentiableSequenceScore, DifferentiableStatisticalModel, SequenceScore, StatisticalModel, Storable

All Known Implementing Classes:
  AbstractVariableLengthDiffSM, CyclicMarkovModelDiffSM, HomogeneousDiffSM, HomogeneousMM0DiffSM, HomogeneousMMDiffSM, UniformHomogeneousDiffSM, VariableLengthMixtureDiffSM

    public interface VariableLengthDiffSM

extends DifferentiableStatisticalModel

This is an interface for all `DifferentiableStatisticalModel`s that allow to score subsequences of arbitrary length. This `DifferentiableStatisticalModel` should be the super class for non-motif `DifferentiableStatisticalModel`s like homogeneous Markov models, cyclic Markov models, ... etc.

Author:
  Jens Keilwagen

Field Summary

Fields inherited from interface de.jstacs.sequenceScores.differentiable.DifferentiableSequenceScore
`UNKNOWN`

Method Summary
`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 startpos, int endpos, IntList indices, DoubleList partialDer)` Returns the logarithmic score for a `Sequence` beginning at position `start` in the `Sequence` and fills lists with the indices and the partial derivations.
`double` | `getLogScoreFor(Sequence seq, int startpos, int endpos)` Returns the logarithmic score for the `Sequence` `seq` beginning at position `start` in the `Sequence`.
`void` | `setStatisticForHyperparameters(int[] length, double[] weight)` This method sets the hyperparameters for the model parameters by evaluating the given statistic.

Methods inherited from interface de.jstacs.sequenceScores.statisticalModels.differentiable.DifferentiableStatisticalModel
`addGradientOfLogPriorTerm, getESS, getLogNormalizationConstant, getLogPartialNormalizationConstant, getLogPriorTerm, getSizeOfEventSpaceForRandomVariablesOfParameter, isNormalized`

Methods inherited from interface de.jstacs.sequenceScores.differentiable.DifferentiableSequenceScore
`clone, getCurrentParameterValues, getInitialClassParam, 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, getNumericalCharacteristics, isInitialized`

Methods inherited from interface de.jstacs.Storable
`toXML`

Method Detail

### getLogNormalizationConstant

    double getLogNormalizationConstant(int length)

  This method returns the logarithm of the normalization constant for a given sequence length.

  Parameters:
    `length` - the sequence length
  Returns:
    the logarithm of the normalization constant
  See Also:
    `DifferentiableStatisticalModel.getLogNormalizationConstant()`

### getLogPartialNormalizationConstant

    double getLogPartialNormalizationConstant(int parameterIndex,
                                              int length)
                                              throws Exception

  This method returns the logarithm of the partial normalization constant for a given parameter index and a sequence length.

  Parameters:
    `parameterIndex` - the index of the parameter
    `length` - the sequence length
  Returns:
    the logarithm of the partial normalization constant
  Throws:
    `Exception` - if something went wrong
  See Also:
    `DifferentiableStatisticalModel.getLogPartialNormalizationConstant(int)`

### getLogScoreFor

    double getLogScoreFor(Sequence seq,
                          int startpos,
                          int endpos)

  Description copied from interface: `SequenceScore`
  Returns the logarithmic score for the `Sequence` `seq` beginning at position `start` in the `Sequence`.

  Specified by:
    `getLogScoreFor` in interface `SequenceScore`
  Parameters:
    `seq` - the `Sequence`
    `startpos` - the start position in the `Sequence`
    `endpos` - the end position (inclusive) in the `Sequence`
  Returns:
    the logarithmic score for the `Sequence`

### getLogScoreAndPartialDerivation

    double getLogScoreAndPartialDerivation(Sequence seq,
                                           int startpos,
                                           int endpos,
                                           IntList indices,
                                           DoubleList partialDer)

  Description copied from interface: `DifferentiableSequenceScore`
  Returns the logarithmic score for a `Sequence` beginning at position `start` in the `Sequence` and fills lists with the indices and the partial derivations.

  Specified by:
    `getLogScoreAndPartialDerivation` in interface `DifferentiableSequenceScore`
  Parameters:
    `seq` - the `Sequence`
    `startpos` - the start position in the `Sequence`
    `endpos` - the end position (inclusive) in the `Sequence`
    `indices` - an `IntList` of indices, after method invocation the list should contain the indices i where is not zero
    `partialDer` - a `DoubleList` of partial derivations, after method invocation the list should contain the corresponding that are not zero
  Returns:
    the logarithmic score for the `Sequence`

### setStatisticForHyperparameters

    void setStatisticForHyperparameters(int[] length,
                                        double[] weight)
                                        throws Exception

  This method sets the hyperparameters for the model parameters by evaluating the given statistic. The statistic can be interpreted as follows: The model has seen a number of sequences. From these sequences it is only known how long (`length`) and how often ( `weight`) they have been seen.

  Parameters:
    `length` - the non-negative lengths of the sequences
    `weight` - the non-negative weight for the corresponding sequence
  Throws:
    `Exception` - if something went wrong
  See Also:
    `Mutable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD