|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.biojava.bio.dp.ModelView
A model that exposes some translated view of another model.
At the moment it is assumed that ModelView contains a 1-2-1 mapping between the states and transitions in the view and the underlying model.
Inner Class Summary | |
class |
ModelView.ViewTransitionTrainer
|
Constructor Summary | |
ModelView()
|
Method Summary | |
void |
addState(State s)
Adds a state to the model. |
boolean |
containsTransition(State from,
State to)
Returns whether a transition is possible in the model. |
protected void |
createTransition(State from,
State to,
MarkovModel within,
State source,
State dest)
|
protected org.biojava.bio.dp.ModelView.ModelTransition |
getMT(State from,
State to)
|
abstract MarkovModel |
getSource()
|
double |
getTransitionScore(State from,
State to)
Probability of the transition between from and to. |
void |
registerWithTrainer(ModelTrainer modelTrainer)
Perform any registration that is necisary with mt. |
State |
sampleTransition(State from)
Sample a transition from the distribution of transitions. |
java.util.Set |
transitionsFrom(State from)
Returns a Set of all legal transitions from a state. |
java.util.Set |
transitionsTo(State to)
Returns a Set of all legal transitions to a state. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ModelView()
Method Detail |
public abstract MarkovModel getSource()
public void addState(State s)
newState
- the state to addpublic State sampleTransition(State from) throws IllegalSymbolException
This will give eroneous results if the scores are not log-probabilities.
from
- the starting stateprotected org.biojava.bio.dp.ModelView.ModelTransition getMT(State from, State to) throws IllegalSymbolException
public boolean containsTransition(State from, State to) throws IllegalSymbolException
from
- the State currently occupiedto
- the State to move topublic java.util.Set transitionsFrom(State from) throws IllegalSymbolException
from
- the starting statepublic java.util.Set transitionsTo(State to) throws IllegalSymbolException
from
- the destination statepublic double getTransitionScore(State from, State to) throws IllegalSymbolException, IllegalTransitionException
from
- the State currently occupiedto
- the State to move topublic void registerWithTrainer(ModelTrainer modelTrainer) throws BioException
This may include registering handelers for transition or emission counts, or registering other Trainable objects with the ModelTrainer.
mt
- the ModelTrainer that encapsulates the training environmentprotected void createTransition(State from, State to, MarkovModel within, State source, State dest) throws IllegalSymbolException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |