## org.biojava.bio.dp
Class ModelView.ViewTransitionTrainer

    java.lang.Object
      |
      +--org.biojava.bio.dp.ModelView.ViewTransitionTrainer

Enclosing class:
  ModelView

public class ModelView.ViewTransitionTrainer
extends java.lang.Object
implements TransitionTrainer, java.io.Serializable

See Also:
  Serialized Form

Constructor Summary
`ModelView.ViewTransitionTrainer()`

Method Summary
`void` `addCount(State from, State to, double count)` Add 'count' to the transition from->to.
`void` `clearCounts()` Clears all of the counts to zero.
`void` `train(double nullModel, double weight)` Trains the transition, given an expected probability, and a weight for that probability.

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

Constructor Detail

### ModelView.ViewTransitionTrainer

    public ModelView.ViewTransitionTrainer()

Method Detail

### addCount

    public void addCount(State from,
                         State to,
                         double count)
                  throws IllegalSymbolException,
                         IllegalTransitionException

  Description copied from interface: TransitionTrainer
  Add 'count' to the transition from->to.

  This method may be called multiple times with the same from,to pair in which case, the times should be summed.

  Specified by:
    addCount in interface TransitionTrainer
  Tags copied from interface: TransitionTrainer
  Parameters:
    `from` - the source state
    `to` - the destination state
    `count` - the number of counts to add

### train

    public void train(double nullModel,
                      double weight)
               throws IllegalSymbolException

  Description copied from interface: TransitionTrainer
  Trains the transition, given an expected probability, and a weight for that probability.

  This is equivalent to adding a count of nullModel * weight to each transition and then training with a weight of 0.

  Specified by:
    train in interface TransitionTrainer
  Tags copied from interface: TransitionTrainer
  Parameters:
    `nullModel` - the nullModel to use
    `weight` - how many lots of the null model to add

### clearCounts

    public void clearCounts()

  Description copied from interface: TransitionTrainer
  Clears all of the counts to zero.
  Specified by:
    clearCounts in interface TransitionTrainer