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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptResult
(ResultProducer rp, Object[] key, Object[] result) Collects each instance and adjusts the header information.Returns the revision string.Returns a string describing this result listenervoid
Perform any postprocessing.void
Prepare 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:
globalInfo
in 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:
preProcess
in interfaceResultListener
- Overrides:
preProcess
in 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:
postProcess
in interfaceResultListener
- Overrides:
postProcess
in 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:
acceptResult
in interfaceResultListener
- Overrides:
acceptResult
in 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:
getRevision
in interfaceRevisionHandler
- Overrides:
getRevision
in classCSVResultListener
- Returns:
- the revision
-