Class CSV
- java.lang.Object
-
- weka.classifiers.evaluation.output.prediction.AbstractOutput
-
- weka.classifiers.evaluation.output.prediction.CSV
-
- All Implemented Interfaces:
java.io.Serializable,OptionHandler
public class CSV extends AbstractOutput
Outputs the predictions as CSV. Valid options are:-p <range> The range of attributes to print in addition to the classification. (default: none)
-distribution Whether to turn on the output of the class distribution. Only for nominal class attributes. (default: off)
-decimals <num> The number of digits after the decimal point. (default: 3)
-file <path> The file to store the output in, instead of outputting it on stdout. Gets ignored if the supplied path is a directory. (default: .)
-suppress In case the data gets stored in a file, then this flag can be used to suppress the regular output. (default: not suppressed)
-use-tab Whether to use TAB as separator instead of comma. (default: comma)
- Version:
- $Revision: 10169 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CSV()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDisplay()Returns a short display text, to be used in comboboxes.java.lang.String[]getOptions()Gets the current option settings for the OptionHandler.booleangetUseTab()Returns whether tab is used as separator.java.lang.StringglobalInfo()Returns a string describing the output generator.java.util.Enumeration<Option>listOptions()Returns an enumeration of all the available options..voidsetOptions(java.lang.String[] options)Sets the OptionHandler's options using the given list.voidsetUseTab(boolean value)Sets whether to use tab instead of comma as separator.java.lang.StringuseTabTipText()Returns the tip text for this property.-
Methods inherited from class weka.classifiers.evaluation.output.prediction.AbstractOutput
attributesTipText, fromCommandline, generatesOutput, getAttributes, getBuffer, getDefaultNumDecimals, getHeader, getNumDecimals, getOutputDistribution, getOutputFile, getSuppressOutput, numDecimalsTipText, outputDistributionTipText, outputFileTipText, print, print, printClassification, printClassification, printClassifications, printClassifications, printFooter, printHeader, setAttributes, setBuffer, setHeader, setNumDecimals, setOutputDistribution, setOutputFile, setSuppressOutput, suppressOutputTipText
-
-
-
-
Method Detail
-
globalInfo
public java.lang.String globalInfo()
Returns a string describing the output generator.- Specified by:
globalInfoin classAbstractOutput- Returns:
- a description suitable for displaying in the GUI
-
getDisplay
public java.lang.String getDisplay()
Returns a short display text, to be used in comboboxes.- Specified by:
getDisplayin classAbstractOutput- Returns:
- a short display text
-
listOptions
public java.util.Enumeration<Option> listOptions()
Returns an enumeration of all the available options..- Specified by:
listOptionsin interfaceOptionHandler- Overrides:
listOptionsin classAbstractOutput- Returns:
- an enumeration of all available options.
-
setOptions
public void setOptions(java.lang.String[] options) throws java.lang.ExceptionSets the OptionHandler's options using the given list. All options will be set (or reset) during this call (i.e. incremental setting of options is not possible).- Specified by:
setOptionsin interfaceOptionHandler- Overrides:
setOptionsin classAbstractOutput- Parameters:
options- the list of options as an array of strings- Throws:
java.lang.Exception- if an option is not supported
-
getOptions
public java.lang.String[] getOptions()
Gets the current option settings for the OptionHandler.- Specified by:
getOptionsin interfaceOptionHandler- Overrides:
getOptionsin classAbstractOutput- Returns:
- the list of current option settings as an array of strings
-
setUseTab
public void setUseTab(boolean value)
Sets whether to use tab instead of comma as separator.- Parameters:
value- true if tab is to be used
-
getUseTab
public boolean getUseTab()
Returns whether tab is used as separator.- Returns:
- true if tab is used instead of comma
-
useTabTipText
public java.lang.String useTabTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI
-
-