public class EmissionCache extends Object implements Serializable
Constructor and Description |
---|
EmissionCache(Alphabet alpha,
State[] states,
int dsi,
ScoreType scoreType) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
double[] |
getEmissions(List symList) |
double[] |
getEmissions(List symList,
boolean exorcise)
Retrieve the emission scores from the cache for every EmissionState
for the specified symbols.
|
public EmissionCache(Alphabet alpha, State[] states, int dsi, ScoreType scoreType)
public final double[] getEmissions(List symList) throws IllegalSymbolException
IllegalSymbolException
public final double[] getEmissions(List symList, boolean exorcise) throws IllegalSymbolException
The correct behaviour should be to exclude emission from the MagicalState except at the origin and bottom-right of the DP matrix. As such, the emission vector is only cached when it it is computed for exorcise set to true. The vector is computed afresh every time when exorcise is false. it should be noted that if exorcise is NOT set to false with the emission vector at the ends of the matrix, the model will fail as the start and and end transitions become impossible.
symList
- a list of the symbols in each head that require a lookup for emission probabilities.exorcise
- Prevents emission from the MagicalState.IllegalSymbolException
public void clear()
Copyright © 2014 BioJava. All rights reserved.