|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcalhoun.analysis.crf.io.OutputHandlerGeneCallStats
public class OutputHandlerGeneCallStats
A legacy output handler that computes basic stats, gene calling statsm and then writes out a GTF file.
| Nested Class Summary | |
|---|---|
static class |
OutputHandlerGeneCallStats.Results
|
| Constructor Summary | |
|---|---|
OutputHandlerGeneCallStats()
default constructor. |
|
OutputHandlerGeneCallStats(ModelManager manager,
InputHandler inputHandler)
creates an output handler using this model and input handler |
|
| Method Summary | |
|---|---|
void |
calcResultIncrement(TrainingSequence training,
int[] predictedHiddenSequence)
calculates statstics and output for results on a given test sequence |
float |
getAccuracy()
returns the exact nucleotide accuracy of the result |
InputHandler |
getInputHandler()
retursn the input handler used to write out the input sequences |
TrainingSequence |
getLabeled(int i)
|
ModelManager |
getManager()
gets the model used to generate results |
double[] |
getViterbiScores()
|
boolean |
isWriteTrainingData()
|
void |
loglikelihoodIncrement(double logLikelihoodActual,
double logLikelihoodViterbi)
|
void |
outputComplete()
indicates the writing of output is complete. |
void |
setInputHandler(InputHandler inputHandler)
sets the inputHandler used to write out the input sequences |
void |
setManager(ModelManager manager)
sets the model used to generate results |
void |
setOutputLocation(java.lang.String location)
sets the output location to write to. |
void |
setWriteTrainingData(boolean writeTrainingData)
|
java.lang.String |
toString()
|
void |
writeGTF(java.util.List<? extends TrainingSequence<?>> refStates,
java.lang.String filename)
|
void |
writeOutput(InputSequence<?> sequence,
int[] hiddenStates)
Writes out a set of predicted hidden states. |
void |
writeTestOutput(InputSequence<?> sequence,
int[] truePath,
int[] hiddenStates)
Writes out a set of hidden states compared with a known true path. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OutputHandlerGeneCallStats()
ModelManager and InputHandler must be configured separately.
public OutputHandlerGeneCallStats(ModelManager manager,
InputHandler inputHandler)
manager - the model used for gene calling. Used for calculating stats.inputHandler - input handler which will be used for writing out the input sequence with the results.| Method Detail |
|---|
public void setOutputLocation(java.lang.String location)
OutputHandler
setOutputLocation in interface OutputHandlerlocation - the location to write the data to. The meaning is implementation dependent.
public void writeOutput(InputSequence<?> sequence,
int[] hiddenStates)
throws java.io.IOException
OutputHandlerOutputHandler.setOutputLocation(java.lang.String)
writeOutput in interface OutputHandlersequence - the input sequence on which predictions were madehiddenStates - an array of state indices for the predicted hidden states.
java.io.IOException
public void writeTestOutput(InputSequence<?> sequence,
int[] truePath,
int[] hiddenStates)
throws java.io.IOException
OutputHandlerOutputHandler.setOutputLocation(java.lang.String)
writeTestOutput in interface OutputHandlersequence - the input sequence on which predictions were madetruePath - an array of hidden states representing the true path.hiddenStates - an array of state indices for the predicted hidden states.
java.io.IOException
public void outputComplete()
throws java.io.IOException
OutputHandler
outputComplete in interface OutputHandlerjava.io.IOExceptionpublic InputHandler getInputHandler()
public void setInputHandler(InputHandler inputHandler)
inputHandler - the inputHandler used to write out the input sequencespublic ModelManager getManager()
public void setManager(ModelManager manager)
manager - the model used to generate resultspublic float getAccuracy()
public java.lang.String toString()
toString in class java.lang.Object
public void calcResultIncrement(TrainingSequence training,
int[] predictedHiddenSequence)
public void loglikelihoodIncrement(double logLikelihoodActual,
double logLikelihoodViterbi)
public TrainingSequence getLabeled(int i)
public void writeGTF(java.util.List<? extends TrainingSequence<?>> refStates,
java.lang.String filename)
throws java.io.IOException
java.io.IOExceptionpublic double[] getViterbiScores()
public boolean isWriteTrainingData()
public void setWriteTrainingData(boolean writeTrainingData)
writeTrainingData - The writeTrainingData to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||