calhoun.analysis.crf.io
Interface OutputHandler

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
OutputHandlerComposite, OutputHandlerGeneCallPredict, OutputHandlerGeneCallStats, OutputHandlerGeneCallStatsInterval29, OutputHandlerWriter

public interface OutputHandler
extends java.io.Serializable

handles outputting of results from predictions.


Method Summary
 void outputComplete()
          indicates the writing of output is complete.
 void setOutputLocation(java.lang.String location)
          sets the output location to write to.
 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.
 

Method Detail

setOutputLocation

void setOutputLocation(java.lang.String location)
sets the output location to write to. This is called before any of the write functions are called.

Parameters:
location - the location to write the data to. The meaning is implementation dependent.

writeOutput

void writeOutput(InputSequence<?> sequence,
                 int[] hiddenStates)
                 throws java.io.IOException
Writes out a set of predicted hidden states. The location will have been specified previously with setOutputLocation(java.lang.String)

Parameters:
sequence - the input sequence on which predictions were made
hiddenStates - an array of state indices for the predicted hidden states.
Throws:
java.io.IOException

writeTestOutput

void writeTestOutput(InputSequence<?> sequence,
                     int[] truePath,
                     int[] hiddenStates)
                     throws java.io.IOException
Writes out a set of hidden states compared with a known true path. The location will have been specified previously with setOutputLocation(java.lang.String)

Parameters:
sequence - the input sequence on which predictions were made
truePath - an array of hidden states representing the true path.
hiddenStates - an array of state indices for the predicted hidden states.
Throws:
java.io.IOException

outputComplete

void outputComplete()
                    throws java.io.IOException
indicates the writing of output is complete. The handler can do any final processing and release resources.

Throws:
java.io.IOException