Package 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCount(State from, State to, double count)Add 'count' to the transition from->to.voidclearCounts()Clears all of the counts to zero.voidtrain(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 stateto- the destination statecount- the number of counts to add- Throws:
IllegalSymbolExceptionIllegalTransitionException
-
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 useweight- how many lots of the null model to add- Throws:
IllegalSymbolException
-
clearCounts
void clearCounts()
Clears all of the counts to zero.
-
-