Class TextOutput
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.tools.wekainvestigator.output.AbstractOutputGenerator<ResultItem>
-
- adams.gui.tools.wekainvestigator.tab.experimenttab.output.AbstractOutputGenerator
-
- adams.gui.tools.wekainvestigator.tab.experimenttab.output.TextOutput
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.SizeOfHandler
,Serializable
public class TextOutput extends AbstractOutputGenerator
Generates textual output.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.core.base.BaseString[]
m_Column
the column (= classifiers).protected ExperimentStatistic
m_ComparisonField
the comparison field.protected weka.experiment.ResultMatrix
m_OutputFormat
the output format.protected boolean
m_OutputHeader
whether to output the header.protected adams.core.base.BaseString[]
m_Row
the row (= datasets).protected boolean
m_RunInformation
whether to print the run information as well.protected double
m_Significance
the significance.protected boolean
m_SwapRowsAndColumns
whether to swap rows and columns.protected int
m_TestBase
the test base.protected weka.experiment.Tester
m_Tester
the tester class to use.
-
Constructor Summary
Constructors Constructor Description TextOutput()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canGenerateOutput(ResultItem item)
Checks whether output can be generated from this item.String
columnTipText()
Returns the tip text for this property.String
comparisonFieldTipText()
Returns the tip text for this property.JComponent
createOutput(ResultItem item, adams.core.MessageCollection errors)
Generates output from the item.void
defineOptions()
Adds options to the internal list of options.adams.core.base.BaseString[]
getColumn()
Returns the list of fields that identify a column.ExperimentStatistic
getComparisonField()
Returns the comparison field.weka.experiment.ResultMatrix
getOutputFormat()
Returns the output format in use for generating the output.boolean
getOutputHeader()
Returns whether to output the header of the result matrix as well.adams.core.base.BaseString[]
getRow()
Returns the list of fields that identify a row.boolean
getRunInformation()
Returns whether the run information is output as well.double
getSignificance()
Returns the current significance level (0-1).boolean
getSwapRowsAndColumns()
Returns whether to swap rows and columns.int
getTestBase()
Returns the index of the test base.weka.experiment.Tester
getTester()
Returns the Tester in use.String
getTitle()
The title to use for the tab.String
globalInfo()
Returns a string describing the object.String
outputFormatTipText()
Returns the tip text for this property.String
outputHeaderTipText()
Returns the tip text for this property.String
rowTipText()
Returns the tip text for this property.String
runInformationTipText()
Returns the tip text for this property.void
setColumn(adams.core.base.BaseString[] value)
Sets list of fields that identify a column.void
setComparisonField(ExperimentStatistic value)
Sets the comparison field.void
setOutputFormat(weka.experiment.ResultMatrix value)
Sets the output format to use for generating the output.void
setOutputHeader(boolean value)
Sets whether to output the header of the result matrix as well.void
setRow(adams.core.base.BaseString[] value)
Sets the list of fields that identify a row.void
setRunInformation(boolean value)
Sets whether the run information is output as well.void
setSignificance(double value)
Sets the significance level (0-1).void
setSwapRowsAndColumns(boolean value)
Sets whether to swap rows and columns.void
setTestBase(int value)
Sets the index of the test base.void
setTester(weka.experiment.Tester value)
Sets the Tester to use.String
significanceTipText()
Returns the tip text for this property.String
swapRowsAndColumnsTipText()
Returns the tip text for this property.String
testBaseTipText()
Returns the tip text for this property.String
testerTipText()
Returns the tip text for this property.-
Methods inherited from class adams.gui.tools.wekainvestigator.output.AbstractOutputGenerator
addTab, generateOutput
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Tester
protected weka.experiment.Tester m_Tester
the tester class to use.
-
m_ComparisonField
protected ExperimentStatistic m_ComparisonField
the comparison field.
-
m_Significance
protected double m_Significance
the significance.
-
m_TestBase
protected int m_TestBase
the test base.
-
m_Row
protected adams.core.base.BaseString[] m_Row
the row (= datasets).
-
m_Column
protected adams.core.base.BaseString[] m_Column
the column (= classifiers).
-
m_SwapRowsAndColumns
protected boolean m_SwapRowsAndColumns
whether to swap rows and columns.
-
m_OutputFormat
protected weka.experiment.ResultMatrix m_OutputFormat
the output format.
-
m_OutputHeader
protected boolean m_OutputHeader
whether to output the header.
-
m_RunInformation
protected boolean m_RunInformation
whether to print the run information as well.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.core.option.AbstractOptionHandler
-
setTester
public void setTester(weka.experiment.Tester value)
Sets the Tester to use.- Parameters:
value
- the Tester
-
getTester
public weka.experiment.Tester getTester()
Returns the Tester in use.- Returns:
- the Tester
-
testerTipText
public String testerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setComparisonField
public void setComparisonField(ExperimentStatistic value)
Sets the comparison field.- Parameters:
value
- the field
-
getComparisonField
public ExperimentStatistic getComparisonField()
Returns the comparison field.- Returns:
- the string
-
comparisonFieldTipText
public String comparisonFieldTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSignificance
public void setSignificance(double value)
Sets the significance level (0-1).- Parameters:
value
- the significance
-
getSignificance
public double getSignificance()
Returns the current significance level (0-1).- Returns:
- the significance
-
significanceTipText
public String significanceTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTestBase
public void setTestBase(int value)
Sets the index of the test base.- Parameters:
value
- the index
-
getTestBase
public int getTestBase()
Returns the index of the test base.- Returns:
- the index
-
testBaseTipText
public String testBaseTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRow
public void setRow(adams.core.base.BaseString[] value)
Sets the list of fields that identify a row.- Parameters:
value
- the list of fields
-
getRow
public adams.core.base.BaseString[] getRow()
Returns the list of fields that identify a row.- Returns:
- the array of fields
-
rowTipText
public String rowTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColumn
public void setColumn(adams.core.base.BaseString[] value)
Sets list of fields that identify a column.- Parameters:
value
- the list of fields
-
getColumn
public adams.core.base.BaseString[] getColumn()
Returns the list of fields that identify a column.- Returns:
- the array of fields
-
columnTipText
public String columnTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSwapRowsAndColumns
public void setSwapRowsAndColumns(boolean value)
Sets whether to swap rows and columns.- Parameters:
value
- true if to swap rows and columns
-
getSwapRowsAndColumns
public boolean getSwapRowsAndColumns()
Returns whether to swap rows and columns.- Returns:
- true if swapping rows and columns
-
swapRowsAndColumnsTipText
public String swapRowsAndColumnsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutputFormat
public void setOutputFormat(weka.experiment.ResultMatrix value)
Sets the output format to use for generating the output.- Parameters:
value
- the format
-
getOutputFormat
public weka.experiment.ResultMatrix getOutputFormat()
Returns the output format in use for generating the output.- Returns:
- the format
-
outputFormatTipText
public String outputFormatTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutputHeader
public void setOutputHeader(boolean value)
Sets whether to output the header of the result matrix as well.- Parameters:
value
- true if to output the header as well
-
getOutputHeader
public boolean getOutputHeader()
Returns whether to output the header of the result matrix as well.- Returns:
- true if to output the header as well
-
outputHeaderTipText
public String outputHeaderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRunInformation
public void setRunInformation(boolean value)
Sets whether the run information is output as well.- Parameters:
value
- if true then the run information is output as well
-
getRunInformation
public boolean getRunInformation()
Returns whether the run information is output as well.- Returns:
- true if the run information is output as well
-
runInformationTipText
public String runInformationTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getTitle
public String getTitle()
The title to use for the tab.- Specified by:
getTitle
in classAbstractOutputGenerator<ResultItem>
- Returns:
- the title
-
canGenerateOutput
public boolean canGenerateOutput(ResultItem item)
Checks whether output can be generated from this item.- Specified by:
canGenerateOutput
in classAbstractOutputGenerator<ResultItem>
- Parameters:
item
- the item to check- Returns:
- true if output can be generated
-
createOutput
public JComponent createOutput(ResultItem item, adams.core.MessageCollection errors)
Generates output from the item.- Specified by:
createOutput
in classAbstractOutputGenerator<ResultItem>
- Parameters:
item
- the item to generate output forerrors
- for collecting error messages- Returns:
- the output component, null if failed to generate
-
-