|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.experiment.CSVResultListener
CSVResultListener outputs the received results in csv format to a Writer
Field Summary | |
protected PrintWriter |
m_Out
The destination for results (typically connected to the output file) |
protected File |
m_OutputFile
The destination output file, null sends to System.out |
protected ResultProducer |
m_RP
The ResultProducer sending us results |
Constructor Summary | |
CSVResultListener()
|
Method Summary | |
void |
acceptResult(ResultProducer rp,
Object[] key,
Object[] result)
Just prints out each result as it is received. |
String[] |
determineColumnConstraints(ResultProducer rp)
Determines if there are any constraints (imposed by the destination) on the result columns to be produced by resultProducers. |
String[] |
getOptions()
Gets the current settings of the Classifier. |
File |
getOutputFile()
Get the value of OutputFile. |
String |
globalInfo()
Returns a string describing this result listener |
boolean |
isResultRequired(ResultProducer rp,
Object[] key)
Always says a result is required. |
Enumeration |
listOptions()
Returns an enumeration describing the available options. |
String |
outputFileTipText()
Returns the tip text for this property |
void |
postProcess(ResultProducer rp)
Perform any postprocessing. |
void |
preProcess(ResultProducer rp)
Prepare for the results to be received. |
void |
setOptions(String[] options)
Parses a given list of options. |
void |
setOutputFile(File newOutputFile)
Set the value of OutputFile. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ResultProducer m_RP
protected File m_OutputFile
protected transient PrintWriter m_Out
Constructor Detail |
public CSVResultListener()
Method Detail |
public String globalInfo()
public Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(String[] options) throws Exception
-O filename
The filename where output will be stored. Use - for stdout.
(default stdout)
setOptions
in interface OptionHandler
options
- the list of options as an array of strings
Exception
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
public String outputFileTipText()
public File getOutputFile()
public void setOutputFile(File newOutputFile)
newOutputFile
- Value to assign to OutputFile.public void preProcess(ResultProducer rp) throws Exception
preProcess
in interface ResultListener
rp
- the ResultProducer that will generate the results
Exception
- if an error occurs during preprocessing.public void postProcess(ResultProducer rp) throws Exception
postProcess
in interface ResultListener
rp
- the ResultProducer that generated the results
Exception
- if an error occurspublic String[] determineColumnConstraints(ResultProducer rp) throws Exception
determineColumnConstraints
in interface ResultListener
rp
- the ResultProducer to which the constraints will apply
Exception
- if an error occurs.public void acceptResult(ResultProducer rp, Object[] key, Object[] result) throws Exception
acceptResult
in interface ResultListener
rp
- the ResultProducer that generated the resultkey
- The key for the results.result
- The actual results.
Exception
- if the result could not be accepted.public boolean isResultRequired(ResultProducer rp, Object[] key) throws Exception
isResultRequired
in interface ResultListener
rp
- the ResultProducer wanting to generate the resultkey
- The key for which a result may be needed.
Exception
- if it could not be determined if the result
is needed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |