程序包 weka.experiment
类 PairedTTester
java.lang.Object
weka.experiment.PairedTTester
- 所有已实现的接口:
Serializable
,OptionHandler
,RevisionHandler
,Tester
- 直接已知子类:
PairedCorrectedTTester
Calculates T-Test statistics on data stored in a set of instances.
Valid options are:
-D <index,index2-index4,...> Specify list of columns that specify a unique dataset. First and last are valid indexes. (default none)
-R <index> Set the index of the column containing the run number
-F <index> Set the index of the column containing the fold number
-G <index1,index2-index4,...> Specify list of columns that specify a unique 'result generator' (eg: classifier name and options). First and last are valid indexes. (default none)
-S <significance level> Set the significance level for comparisons (default 0.05)
-V Show standard deviations
-L Produce table comparisons in Latex table format
-csv Produce table comparisons in CSV table format
-html Produce table comparisons in HTML table format
-significance Produce table comparisons with only the significance values
-gnuplot Produce table comparisons output suitable for GNUPlot
- 版本:
- $Revision: 6431 $
- 作者:
- Len Trigg (trigg@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
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 testerint
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.String[]
Gets current settings of the PairedTTester.Gets the instance that produces the output.Get the value of ResultsetKeyColumns.getResultsetName
(int index) Gets a string descriptive of the specified resultset.Returns the revision string.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.Lists options understood by this object.static void
Test the class from the command line.multiResultsetFull
(int baseResultset, int comparisonColumn) Creates a comparison table where a base resultset is compared to the other resultsets.multiResultsetRanking
(int comparisonColumn) returns a ranking of the resultsetsmultiResultsetSummary
(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
setOptions
(String[] options) Parses a given list of options.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.
-
构造器详细资料
-
PairedTTester
public PairedTTester()
-
-
方法详细资料
-
setResultMatrix
Sets the matrix to use to produce the output.- 指定者:
setResultMatrix
在接口中Tester
- 参数:
matrix
- the instance to use to produce the output- 另请参阅:
-
getResultMatrix
Gets the instance that produces the output.- 指定者:
getResultMatrix
在接口中Tester
- 返回:
- the instance to produce the output
-
setShowStdDevs
public void setShowStdDevs(boolean s) Set whether standard deviations are displayed or not.- 指定者:
setShowStdDevs
在接口中Tester
- 参数:
s
- true if standard deviations are to be displayed
-
getShowStdDevs
public boolean getShowStdDevs()Returns true if standard deviations have been requested.- 指定者:
getShowStdDevs
在接口中Tester
- 返回:
- true if standard deviations are to be displayed.
-
getNumDatasets
public int getNumDatasets()Gets the number of datasets in the resultsets- 指定者:
getNumDatasets
在接口中Tester
- 返回:
- the number of datasets in the resultsets
-
getNumResultsets
public int getNumResultsets()Gets the number of resultsets in the data.- 指定者:
getNumResultsets
在接口中Tester
- 返回:
- the number of resultsets in the data
-
getResultsetName
Gets a string descriptive of the specified resultset.- 指定者:
getResultsetName
在接口中Tester
- 参数:
index
- the index of the resultset- 返回:
- a descriptive string for the resultset
-
displayResultset
public boolean displayResultset(int index) Checks whether the resultset with the given index shall be displayed.- 指定者:
displayResultset
在接口中Tester
- 参数:
index
- the index of the resultset to check whether it shall be displayed- 返回:
- whether the specified resultset is displayed
-
calculateStatistics
public 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.- 指定者:
calculateStatistics
在接口中Tester
- 参数:
datasetSpecifier
- the dataset specifierresultset1Index
- the index of the first resultsetresultset2Index
- the index of the second resultsetcomparisonColumn
- the column containing values to compare- 返回:
- the results of the paired comparison
- 抛出:
Exception
- if an error occurs
-
resultsetKey
Creates a key that maps resultset numbers to their descriptions.- 指定者:
resultsetKey
在接口中Tester
- 返回:
- a value of type 'String'
-
header
Creates a "header" string describing the current resultsets. -
multiResultsetWins
Carries out a comparison between all resultsets, counting the number of datsets where one resultset outperforms the other.- 指定者:
multiResultsetWins
在接口中Tester
- 参数:
comparisonColumn
- the index of the comparison columnnonSigWin
- for storing the non-significant wins- 返回:
- a 2d array where element [i][j] is the number of times resultset j performed significantly better than resultset i.
- 抛出:
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.- 指定者:
multiResultsetSummary
在接口中Tester
- 参数:
comparisonColumn
- the index of the comparison column- 返回:
- the results in a string
- 抛出:
Exception
- if an error occurs
-
multiResultsetRanking
returns a ranking of the resultsets- 指定者:
multiResultsetRanking
在接口中Tester
- 参数:
comparisonColumn
- the column to compare with- 返回:
- the ranking
- 抛出:
Exception
- if something goes wrong
-
multiResultsetFull
Creates a comparison table where a base resultset is compared to the other resultsets. Results are presented for every dataset.- 指定者:
multiResultsetFull
在接口中Tester
- 参数:
baseResultset
- the index of the base resultsetcomparisonColumn
- the index of the column to compare over- 返回:
- the comparison table string
- 抛出:
Exception
- if an error occurs
-
listOptions
Lists options understood by this object.- 指定者:
listOptions
在接口中OptionHandler
- 返回:
- an enumeration of Options.
-
setOptions
Parses a given list of options. Valid options are:-D <index,index2-index4,...> Specify list of columns that specify a unique dataset. First and last are valid indexes. (default none)
-R <index> Set the index of the column containing the run number
-F <index> Set the index of the column containing the fold number
-G <index1,index2-index4,...> Specify list of columns that specify a unique 'result generator' (eg: classifier name and options). First and last are valid indexes. (default none)
-S <significance level> Set the significance level for comparisons (default 0.05)
-V Show standard deviations
-L Produce table comparisons in Latex table format
-csv Produce table comparisons in CSV table format
-html Produce table comparisons in HTML table format
-significance Produce table comparisons with only the significance values
-gnuplot Produce table comparisons output suitable for GNUPlot
- 指定者:
setOptions
在接口中OptionHandler
- 参数:
options
- an array containing options to set.- 抛出:
Exception
- if invalid options are given
-
getOptions
Gets current settings of the PairedTTester.- 指定者:
getOptions
在接口中OptionHandler
- 返回:
- an array of strings containing current options.
-
getResultsetKeyColumns
Get the value of ResultsetKeyColumns.- 指定者:
getResultsetKeyColumns
在接口中Tester
- 返回:
- Value of ResultsetKeyColumns.
-
setResultsetKeyColumns
Set the value of ResultsetKeyColumns.- 指定者:
setResultsetKeyColumns
在接口中Tester
- 参数:
newResultsetKeyColumns
- Value to assign to ResultsetKeyColumns.
-
getDisplayedResultsets
public int[] getDisplayedResultsets()Gets the indices of the the datasets that are displayed (ifnull
then all are displayed). The base is always displayed.- 指定者:
getDisplayedResultsets
在接口中Tester
- 返回:
- the indices of the datasets to display
-
setDisplayedResultsets
public void setDisplayedResultsets(int[] cols) Sets the indicies of the datasets to display (null
means all). The base is always displayed.- 指定者:
setDisplayedResultsets
在接口中Tester
- 参数:
cols
- the indices of the datasets to display
-
getSignificanceLevel
public double getSignificanceLevel()Get the value of SignificanceLevel.- 指定者:
getSignificanceLevel
在接口中Tester
- 返回:
- Value of SignificanceLevel.
-
setSignificanceLevel
public void setSignificanceLevel(double newSignificanceLevel) Set the value of SignificanceLevel.- 指定者:
setSignificanceLevel
在接口中Tester
- 参数:
newSignificanceLevel
- Value to assign to SignificanceLevel.
-
getDatasetKeyColumns
Get the value of DatasetKeyColumns.- 指定者:
getDatasetKeyColumns
在接口中Tester
- 返回:
- Value of DatasetKeyColumns.
-
setDatasetKeyColumns
Set the value of DatasetKeyColumns.- 指定者:
setDatasetKeyColumns
在接口中Tester
- 参数:
newDatasetKeyColumns
- Value to assign to DatasetKeyColumns.
-
getRunColumn
public int getRunColumn()Get the value of RunColumn.- 指定者:
getRunColumn
在接口中Tester
- 返回:
- Value of RunColumn.
-
setRunColumn
public void setRunColumn(int newRunColumn) Set the value of RunColumn.- 指定者:
setRunColumn
在接口中Tester
- 参数:
newRunColumn
- Value to assign to RunColumn.
-
getFoldColumn
public int getFoldColumn()Get the value of FoldColumn.- 指定者:
getFoldColumn
在接口中Tester
- 返回:
- Value of FoldColumn.
-
setFoldColumn
public void setFoldColumn(int newFoldColumn) Set the value of FoldColumn.- 指定者:
setFoldColumn
在接口中Tester
- 参数:
newFoldColumn
- Value to assign to FoldColumn.
-
getSortColumnName
Returns the name of the column to sort on.- 指定者:
getSortColumnName
在接口中Tester
- 返回:
- the name of the column to sort on.
-
getSortColumn
public int getSortColumn()Returns the column to sort on, -1 means the default sorting.- 指定者:
getSortColumn
在接口中Tester
- 返回:
- the column to sort on.
-
setSortColumn
public void setSortColumn(int newSortColumn) Set the column to sort on, -1 means the default sorting.- 指定者:
setSortColumn
在接口中Tester
- 参数:
newSortColumn
- the new sort column.
-
getInstances
Get the value of Instances.- 指定者:
getInstances
在接口中Tester
- 返回:
- Value of Instances.
-
setInstances
Set the value of Instances.- 指定者:
setInstances
在接口中Tester
- 参数:
newInstances
- Value to assign to Instances.
-
assign
retrieves all the settings from the given Tester -
getToolTipText
returns a string that is displayed as tooltip on the "perform test" button in the experimenter- 指定者:
getToolTipText
在接口中Tester
- 返回:
- the tool tip
-
getDisplayName
returns the name of the tester- 指定者:
getDisplayName
在接口中Tester
- 返回:
- the display name
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-
main
Test the class from the command line.- 参数:
args
- contains options for the instance ttests
-