Package weka.experiment
Interface Tester
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
PairedCorrectedTTester
,PairedTTester
Interface for different kinds of Testers in the Experimenter.
- Version:
- $Revision: 8034 $
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
retrieves all the settings from the given TestercalculateStatistics
(Instance datasetSpecifier, int resultset1Index, int resultset2Index, int comparisonColumn) Computes a paired t-test comparison for a specified dataset between two resultsets.boolean
displayResultset
(int index) Checks whether the resultset with the given index shall be displayed.Get the value of DatasetKeyColumns.int[]
Gets the indices of the the datasets that are displayed (ifnull
then all are displayed).returns the name of the testing algorithmint
Get the value of FoldColumn.Get the value of Instances.int
Gets the number of datasets in the resultsetsint
Gets the number of resultsets in the data.Gets the instance that produces the output.Get the value of ResultsetKeyColumns.getResultsetName
(int index) Gets a string descriptive of the specified resultset.int
Get the value of RunColumn.boolean
Returns true if standard deviations have been requested.double
Get the value of SignificanceLevel.int
Returns the column to sort on, -1 means the default sorting.Returns the name of the column to sort on.returns a string that is displayed as tooltip on the "perform test" button in the experimenterheader
(int comparisonColumn) Creates a "header" string describing the current resultsets.multiResultsetFull
(int baseResultset, int comparisonColumn) Creates a comparison table where a base resultset is compared to the other resultsets.multiResultsetRanking
(int comparisonColumn) multiResultsetSummary
(int comparisonColumn) Carries out a comparison between all resultsets, counting the number of datsets where one resultset outperforms the other.int[][]
multiResultsetWins
(int comparisonColumn, int[][] nonSigWin) Carries out a comparison between all resultsets, counting the number of datsets where one resultset outperforms the other.Creates a key that maps resultset numbers to their descriptions.void
setDatasetKeyColumns
(Range newDatasetKeyColumns) Set the value of DatasetKeyColumns.void
setDisplayedResultsets
(int[] cols) Sets the indicies of the datasets to display (null
means all).void
setFoldColumn
(int newFoldColumn) Set the value of FoldColumn.void
setInstances
(Instances newInstances) Set the value of Instances.void
setResultMatrix
(ResultMatrix matrix) Sets the matrix to use to produce the output.void
setResultsetKeyColumns
(Range newResultsetKeyColumns) Set the value of ResultsetKeyColumns.void
setRunColumn
(int newRunColumn) Set the value of RunColumn.void
setShowStdDevs
(boolean s) Set whether standard deviations are displayed or not.void
setSignificanceLevel
(double newSignificanceLevel) Set the value of SignificanceLevel.void
setSortColumn
(int newSortColumn) Set the column to sort on, -1 means the default sorting.
-
Method Details
-
getDisplayName
String getDisplayName()returns the name of the testing algorithm -
getToolTipText
String getToolTipText()returns a string that is displayed as tooltip on the "perform test" button in the experimenter -
assign
retrieves all the settings from the given Tester- Parameters:
tester
- the Tester to get the settings from
-
setResultMatrix
Sets the matrix to use to produce the output.- Parameters:
matrix
- the instance to use to produce the output- See Also:
-
getResultMatrix
ResultMatrix getResultMatrix()Gets the instance that produces the output.- Returns:
- the instance to produce the output
-
setShowStdDevs
void setShowStdDevs(boolean s) Set whether standard deviations are displayed or not.- Parameters:
s
- true if standard deviations are to be displayed
-
getShowStdDevs
boolean getShowStdDevs()Returns true if standard deviations have been requested.- Returns:
- true if standard deviations are to be displayed.
-
getNumDatasets
int getNumDatasets()Gets the number of datasets in the resultsets- Returns:
- the number of datasets in the resultsets
-
getNumResultsets
int getNumResultsets()Gets the number of resultsets in the data.- Returns:
- the number of resultsets in the data
-
getResultsetName
Gets a string descriptive of the specified resultset.- Parameters:
index
- the index of the resultset- Returns:
- a descriptive string for the resultset
-
displayResultset
boolean displayResultset(int index) Checks whether the resultset with the given index shall be displayed.- Parameters:
index
- the index of the resultset to check whether it shall be displayed- Returns:
- whether the specified resultset is displayed
-
calculateStatistics
PairedStats calculateStatistics(Instance datasetSpecifier, int resultset1Index, int resultset2Index, int comparisonColumn) throws Exception Computes a paired t-test comparison for a specified dataset between two resultsets.- Parameters:
datasetSpecifier
- the dataset specifierresultset1Index
- the index of the first resultsetresultset2Index
- the index of the second resultsetcomparisonColumn
- the column containing values to compare- Returns:
- the results of the paired comparison
- Throws:
Exception
- if an error occurs
-
resultsetKey
String resultsetKey()Creates a key that maps resultset numbers to their descriptions.- Returns:
- a value of type 'String'
-
header
Creates a "header" string describing the current resultsets.- Parameters:
comparisonColumn
- a value of type 'int'- Returns:
- a value of type 'String'
-
multiResultsetWins
Carries out a comparison between all resultsets, counting the number of datsets where one resultset outperforms the other.- Parameters:
comparisonColumn
- the index of the comparison column- Returns:
- a 2d array where element [i][j] is the number of times resultset j performed significantly better than resultset i.
- Throws:
Exception
- if an error occurs
-
multiResultsetSummary
Carries out a comparison between all resultsets, counting the number of datsets where one resultset outperforms the other. The results are summarized in a table.- Parameters:
comparisonColumn
- the index of the comparison column- Returns:
- the results in a string
- Throws:
Exception
- if an error occurs
-
multiResultsetRanking
- Throws:
Exception
-
multiResultsetFull
Creates a comparison table where a base resultset is compared to the other resultsets. Results are presented for every dataset.- Parameters:
baseResultset
- the index of the base resultsetcomparisonColumn
- the index of the column to compare over- Returns:
- the comparison table string
- Throws:
Exception
- if an error occurs
-
getResultsetKeyColumns
Range getResultsetKeyColumns()Get the value of ResultsetKeyColumns.- Returns:
- Value of ResultsetKeyColumns.
-
setResultsetKeyColumns
Set the value of ResultsetKeyColumns.- Parameters:
newResultsetKeyColumns
- Value to assign to ResultsetKeyColumns.
-
getDisplayedResultsets
int[] getDisplayedResultsets()Gets the indices of the the datasets that are displayed (ifnull
then all are displayed). The base is always displayed.- Returns:
- the indices of the datasets to display
-
setDisplayedResultsets
void setDisplayedResultsets(int[] cols) Sets the indicies of the datasets to display (null
means all). The base is always displayed.- Parameters:
cols
- the indices of the datasets to display
-
getSignificanceLevel
double getSignificanceLevel()Get the value of SignificanceLevel.- Returns:
- Value of SignificanceLevel.
-
setSignificanceLevel
void setSignificanceLevel(double newSignificanceLevel) Set the value of SignificanceLevel.- Parameters:
newSignificanceLevel
- Value to assign to SignificanceLevel.
-
getDatasetKeyColumns
Range getDatasetKeyColumns()Get the value of DatasetKeyColumns.- Returns:
- Value of DatasetKeyColumns.
-
setDatasetKeyColumns
Set the value of DatasetKeyColumns.- Parameters:
newDatasetKeyColumns
- Value to assign to DatasetKeyColumns.
-
getRunColumn
int getRunColumn()Get the value of RunColumn.- Returns:
- Value of RunColumn.
-
setRunColumn
void setRunColumn(int newRunColumn) Set the value of RunColumn.- Parameters:
newRunColumn
- Value to assign to RunColumn.
-
getFoldColumn
int getFoldColumn()Get the value of FoldColumn.- Returns:
- Value of FoldColumn.
-
setFoldColumn
void setFoldColumn(int newFoldColumn) Set the value of FoldColumn.- Parameters:
newFoldColumn
- Value to assign to FoldColumn.
-
getSortColumnName
String getSortColumnName()Returns the name of the column to sort on.- Returns:
- the name of the column to sort on.
-
getSortColumn
int getSortColumn()Returns the column to sort on, -1 means the default sorting.- Returns:
- the column to sort on.
-
setSortColumn
void setSortColumn(int newSortColumn) Set the column to sort on, -1 means the default sorting.- Parameters:
newSortColumn
- the new sort column.
-
getInstances
Instances getInstances()Get the value of Instances.- Returns:
- Value of Instances.
-
setInstances
Set the value of Instances.- Parameters:
newInstances
- Value to assign to Instances.
-