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.trainable
Interface TrainableStatisticalModel

All Superinterfaces:
  Cloneable, SequenceScore, StatisticalModel, Storable

All Known Implementing Classes:
  AbstractHMM, AbstractMixtureTrainSM, AbstractTrainableStatisticalModel, BayesianNetworkTrainSM, CompositeTrainSM, DAGTrainSM, DifferentiableHigherOrderHMM, DifferentiableStatisticalModelWrapperTrainSM, DiscreteGraphicalTrainSM, FSDAGModelForGibbsSampling, FSDAGTrainSM, HiddenMotifMixture, HigherOrderHMM, HomogeneousMM, HomogeneousTrainSM, InhomogeneousDGTrainSM, MixtureTrainSM, SamplingHigherOrderHMM, SamplingPhyloHMM, SharedStructureMixture, StrandTrainSM, UniformTrainSM, VariableLengthWrapperTrainSM, ZOOPSTrainSM

    public interface TrainableStatisticalModel

extends StatisticalModel

This interface defines all methods for a probabilistic model.

Author:
  Andre Gohr, Jan Grau, Jens Keilwagen

Method Summary
`TrainableStatisticalModel` | `clone()` Creates a clone (deep copy) of the current `TrainableStatisticalModel` instance.
`String` | `toString()` Should give a simple representation (text) of the model as `String`.
`void` | `train(DataSet data)` Trains the `TrainableStatisticalModel` object given the data as `DataSet`.
`void` | `train(DataSet data, double[] weights)` Trains the `TrainableStatisticalModel` object given the data as `DataSet` using the specified weights.

Methods inherited from interface de.jstacs.sequenceScores.statisticalModels.StatisticalModel
`emitDataSet, getLogPriorTerm, getLogProbFor, getLogProbFor, getLogProbFor, getMaximalMarkovOrder`

Methods inherited from interface de.jstacs.sequenceScores.SequenceScore
`getAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized`

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

Method Detail

### clone

    TrainableStatisticalModel clone()
                                    throws CloneNotSupportedException

  Creates a clone (deep copy) of the current `TrainableStatisticalModel` instance.

  Specified by:
    `clone` in interface `SequenceScore`
  Returns:
    the cloned instance
  Throws:
    `CloneNotSupportedException` - if something went wrong while cloning

### train

    void train(DataSet data)
               throws Exception

  Trains the `TrainableStatisticalModel` object given the data as `DataSet`.
  This method should work non-incrementally. That means the result of the following series: `train(data1)`; `train(data2)` should be a fully trained model over `data2` and not over `data1+data2`. All parameters of the model were given by the call of the constructor.

  Parameters:
    `data` - the given sequences as `DataSet`
  Throws:
    `Exception` - if the training did not succeed
  See Also:
    `DataSet.getElementAt(int)`, `DataSet.ElementEnumerator`

### train

    void train(DataSet data,
               double[] weights)
               throws Exception

  Trains the `TrainableStatisticalModel` object given the data as `DataSet` using the specified weights. The weight at position i belongs to the element at position i. So the array `weight` should have the number of sequences in the sample as dimension. (Optionally it is possible to use `weight == null` if all weights have the value one.)
  This method should work non-incrementally. That means the result of the following series: `train(data1)`; `train(data2)` should be a fully trained model over `data2` and not over `data1+data2`. All parameters of the model were given by the call of the constructor.

  Parameters:
    `data` - the given sequences as `DataSet`
    `weights` - the weights of the elements, each weight should be non-negative
  Throws:
    `Exception` - if the training did not succeed (e.g. the dimension of `weights` and the number of sequences in the sample do not match)
  See Also:
    `DataSet.getElementAt(int)`, `DataSet.ElementEnumerator`

### toString

    String toString()

  Should give a simple representation (text) of the model as `String`.

  Overrides:
    `toString` in class `Object`
  Returns:
    the representation as `String`

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