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.models.hmm.models
Class SamplingPhyloHMM

    java.lang.Object
      de.jstacs.models.hmm.AbstractHMM
          de.jstacs.models.hmm.models.HigherOrderHMM
              de.jstacs.models.hmm.models.SamplingHigherOrderHMM
                  de.jstacs.models.hmm.models.SamplingPhyloHMM

All Implemented Interfaces:
  Model, Storable, Cloneable

    public class SamplingPhyloHMM

extends SamplingHigherOrderHMM

This class implements an (higher order) HMM that contains multi-dimensional emissions described by a phylogenetic tree. The model is trained by a Metropolis-Hastings algorithm.

Author:
  Michael Scharfe

Nested Class Summary

Nested classes/interfaces inherited from class de.jstacs.models.hmm.models.SamplingHigherOrderHMM
`SamplingHigherOrderHMM.ViterbiComputation`

Nested classes/interfaces inherited from class de.jstacs.models.hmm.models.HigherOrderHMM
`HigherOrderHMM.Type`

Field Summary

Fields inherited from class de.jstacs.models.hmm.models.SamplingHigherOrderHMM
`burnInTest, hasSampled`

Fields inherited from class de.jstacs.models.hmm.models.HigherOrderHMM
`backwardIntermediate, container, logEmission, numberOfSummands, stateList`

Fields inherited from class de.jstacs.models.hmm.AbstractHMM
`bwdMatrix, con, emission, emissionIdx, finalState, forward, fwdMatrix, name, sostream, START_NODE, states, trainingParameter, transition`

Constructor Summary
`SamplingPhyloHMM(SamplingHMMTrainingParameterSet trainingParameterSet, String[] name, int[] emissionIdx, boolean[] forward, PhyloDiscreteEmission[] emission, TransitionElement... te)` This is the main constructor for a hidden markov model with phylogenetic emission(s) This model can be trained using a metropolis hastings algorithm
`SamplingPhyloHMM(StringBuffer xml)` The standard constructor for the interface `Storable`.

Method Summary
`String` | `getInstanceName()` Should return a short instance name such as iMM(0), BN(2), ...
`protected void` | `getNewParameters()` This method set all parameters for the next sampling step

Methods inherited from class de.jstacs.models.hmm.models.SamplingHigherOrderHMM
`acceptParameters, appendFurtherInformation, clone, createStates, drawFromStatistics, extractFurtherInformation, furtherInits, getLogPosteriorFromStatistic, getLogProbForPath, getLogStatePosteriorMatrixFor, getViterbiPath, getViterbiPathFor, getXMLTag, gibbsSampling, gibbsSamplingStep, initTraining, isTrained, logProb, parseNextParameterSet, parseParameterSet, train`

Methods inherited from class de.jstacs.models.hmm.models.HigherOrderHMM
`baumWelch, createHelperVariables, emitSample, estimateFromStatistics, fillBwdMatrix, fillBwdOrViterbiMatrix, fillFwdMatrix, fillLogStatePosteriorMatrix, finalize, getCharacteristics, getLength, getLogPriorTerm, getLogProbFor, getLogProbFor, getMaximalMarkovOrder, getNumericalCharacteristics, initializeRandomly, resetStatistics, samplePath, viterbi`

Methods inherited from class de.jstacs.models.hmm.AbstractHMM
`createMatrixForStatePosterior, decodeStatePosterior, determineFinalStates, fromXML, getAlphabetContainer, getFinalStatePosterioriMatrix, getGraphvizRepresentation, getGraphvizRepresentation, getGraphvizRepresentation, getLogProbFor, getLogProbFor, getLogProbFor, getLogStatePosteriorMatrixFor, getNumberOfStates, getPriorTerm, getProbFor, getProbFor, getProbFor, getRunTimeException, getStatePosteriorMatrixFor, getStatePosteriorMatrixFor, getViterbiPathFor, getViterbiPathsFor, initTransition, provideMatrix, setNewAlphabetContainerInstance, setOutputStream, toString, toXML, train`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SamplingPhyloHMM

    public SamplingPhyloHMM(SamplingHMMTrainingParameterSet trainingParameterSet,
                            String[] name,
                            int[] emissionIdx,
                            boolean[] forward,
                            PhyloDiscreteEmission[] emission,
                            TransitionElement... te)
                     throws CloneNotSupportedException,
                            IllegalArgumentException,
                            WrongAlphabetException,
                            Exception

  This is the main constructor for a hidden markov model with phylogenetic emission(s) This model can be trained using a metropolis hastings algorithm

  Parameters:
    `trainingParameterSet` - the `ParameterSet` that determines the training algorithm and contains the necessary `Parameter`s
    `name` - the names of the states
    `emissionIdx` - the indices of the emissions that should be used for each state
    `forward` - a boolean array that indicates whether the symbol on the forward or the reverse complementary strand should be used
    `emission` - the emissions
    `te` - the `TransitionElement`s building a transition
  Throws:
    `CloneNotSupportedException` - if the parameters or the emissions or transition elements could not be cloned
    `IllegalArgumentException` - if one of the parameters is not allowed
    `WrongAlphabetException` - if the alphabet does not fit the model
    `Exception` - if something else went wrong

### SamplingPhyloHMM

    public SamplingPhyloHMM(StringBuffer xml)
                     throws NonParsableException

  The standard constructor for the interface `Storable`. Constructs an `SamplingPhyloHMM` out of an XML representation.

  Parameters:
    `xml` - the XML representation as `StringBuffer`
  Throws:
    `NonParsableException` - if the `SamplingPhyloHMM` could not be reconstructed out of the `StringBuffer` `xml`

Method Detail

### getInstanceName

    public String getInstanceName()

  Description copied from interface: `Model`
  Should return a short instance name such as iMM(0), BN(2), ...

  Specified by:
    `getInstanceName` in interface `Model`
  Overrides:
    `getInstanceName` in class `SamplingHigherOrderHMM`
  Returns:
    a short instance name

### getNewParameters

    protected void getNewParameters()
                             throws Exception

  Description copied from class: `SamplingHigherOrderHMM`
  This method set all parameters for the next sampling step

  Overrides:
    `getNewParameters` in class `SamplingHigherOrderHMM`
  Throws:
    `Exception` - if something went wrong

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