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

## org.biojava.bio.dp
Interface TransitionTrainer

    public interface TransitionTrainer

An object that can be used to train the transitions within a MarkovModel.

Author:
  Matthew Pocock

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.

Method Detail

### addCount

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

  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.

  Parameters:
    `from` - the source state
    `to` - the destination state
    `count` - the number of counts to add
  Throws:
    `IllegalSymbolException`
    `IllegalTransitionException`

### train

    void train(double nullModel,
               double weight)
               throws IllegalSymbolException

  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.

  Parameters:
    `nullModel` - the nullModel to use
    `weight` - how many lots of the null model to add
  Throws:
    `IllegalSymbolException`

### clearCounts

    void clearCounts()

  Clears all of the counts to zero.

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