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
Modifier and TypeMethodDescriptionvoidAdd 'count' to the transition from->to.voidClears 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 Details
-
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
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.
-