All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.experiment.CSVResultListener
java.lang.Object
|
+----weka.experiment.CSVResultListener
- public class CSVResultListener
- extends Object
- implements ResultListener, OptionHandler
CSVResultListener outputs the received results in csv format to
a Writer
- Version:
- $Revision: 1.2 $
- Author:
- Len Trigg (trigg@cs.waikato.ac.nz)
-
CSVResultListener()
-
-
acceptResult(ResultProducer, Object[], Object[])
- Just prints out each result as it is received.
-
getOptions()
- Gets the current settings of the Classifier.
-
getOutputFile()
- Get the value of OutputFile.
-
isResultRequired(ResultProducer, Object[])
- Always says a result is required.
-
listOptions()
- Returns an enumeration describing the available options.
-
postProcess(ResultProducer)
- Perform any postprocessing.
-
preProcess(ResultProducer)
- Prepare for the results to be received.
-
setOptions(String[])
- Parses a given list of options.
-
setOutputFile(File)
- Set the value of OutputFile.
CSVResultListener
public CSVResultListener()
listOptions
public Enumeration listOptions()
- Returns an enumeration describing the available options.
- Returns:
- an enumeration of all the available options
setOptions
public void setOptions(String options[]) throws Exception
- Parses a given list of options. Valid options are:
-O filename
The filename where output will be stored. Use - for stdout.
(default stdout)
- Parameters:
- options - the list of options as an array of strings
- Throws: Exception
- if an option is not supported
getOptions
public String[] getOptions()
- Gets the current settings of the Classifier.
- Returns:
- an array of strings suitable for passing to setOptions
getOutputFile
public File getOutputFile()
- Get the value of OutputFile.
- Returns:
- Value of OutputFile.
setOutputFile
public void setOutputFile(File newOutputFile)
- Set the value of OutputFile.
- Parameters:
- newOutputFile - Value to assign to OutputFile.
preProcess
public void preProcess(ResultProducer rp) throws Exception
- Prepare for the results to be received.
- Parameters:
- rp - the ResultProducer that will generate the results
- Throws: Exception
- if an error occurs during preprocessing.
postProcess
public void postProcess(ResultProducer rp) throws Exception
- Perform any postprocessing. When this method is called, it indicates
that no more results will be sent that need to be grouped together
in any way.
- Parameters:
- rp - the ResultProducer that generated the results
- Throws: Exception
- if an error occurs
acceptResult
public void acceptResult(ResultProducer rp,
Object key[],
Object result[]) throws Exception
- Just prints out each result as it is received.
- Parameters:
- rp - the ResultProducer that generated the result
- key - The key for the results.
- result - The actual results.
- Throws: Exception
- if the result could not be accepted.
isResultRequired
public boolean isResultRequired(ResultProducer rp,
Object key[]) throws Exception
- Always says a result is required. If this is the first call,
prints out the header for the csv output.
- Parameters:
- rp - the ResultProducer wanting to generate the result
- key - The key for which a result may be needed.
- Returns:
- true if the result should be calculated.
- Throws: Exception
- if it could not be determined if the result
is needed.
All Packages Class Hierarchy This Package Previous Next Index WEKA's home