Package weka.experiment
Class InstancesResultListener
java.lang.Object
weka.experiment.CSVResultListener
weka.experiment.InstancesResultListener
- All Implemented Interfaces:
Serializable,OptionHandler,RevisionHandler,ResultListener
Outputs the received results in arff format to a
Writer. All results must be received before the instances can be written out.
Valid options are:
-O <file name> The filename where output will be stored. Use - for stdout. (default temp file)
- Version:
- $Revision: 10203 $
- Author:
- Len Trigg (trigg@cs.waikato.ac.nz)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptResult(ResultProducer rp, Object[] key, Object[] result) Collects each instance and adjusts the header information.Returns the revision string.Returns a string describing this result listenervoidPerform any postprocessing.voidPrepare for the results to be received.Methods inherited from class weka.experiment.CSVResultListener
determineColumnConstraints, getOptions, getOutputFile, isResultRequired, listOptions, outputFileName, outputFileTipText, setOptions, setOutputFile, setOutputFileName
-
Constructor Details
-
InstancesResultListener
public InstancesResultListener()Sets temporary file.
-
-
Method Details
-
globalInfo
Returns a string describing this result listener- Overrides:
globalInfoin classCSVResultListener- Returns:
- a description of the result listener suitable for displaying in the explorer/experimenter gui
-
preProcess
Prepare for the results to be received.- Specified by:
preProcessin interfaceResultListener- Overrides:
preProcessin classCSVResultListener- Parameters:
rp- the ResultProducer that will generate the results- Throws:
Exception- if an error occurs during preprocessing.
-
postProcess
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.- Specified by:
postProcessin interfaceResultListener- Overrides:
postProcessin classCSVResultListener- Parameters:
rp- the ResultProducer that generated the results- Throws:
Exception- if an error occurs
-
acceptResult
Collects each instance and adjusts the header information.- Specified by:
acceptResultin interfaceResultListener- Overrides:
acceptResultin classCSVResultListener- Parameters:
rp- the ResultProducer that generated the resultkey- The key for the results.result- The actual results.- Throws:
Exception- if the result could not be accepted.
-
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Overrides:
getRevisionin classCSVResultListener- Returns:
- the revision
-