类 CheckAttributeSelection
java.lang.Object
weka.core.Check
weka.core.CheckScheme
weka.attributeSelection.CheckAttributeSelection
- 所有已实现的接口:
OptionHandler
,RevisionHandler
Class for examining the capabilities and finding problems with
attribute selection schemes. If you implement an attribute selection using
the WEKA.libraries, you should run the checks on it to ensure robustness
and correct operation. Passing all the tests of this object does not mean
bugs in the attribute selection don't exist, but this will help find some
common ones.
Typical usage:
java weka.attributeSelection.CheckAttributeSelection -W ASscheme_name
-- ASscheme_options
CheckAttributeSelection reports on the following:
- Scheme abilities
- Possible command line options to the scheme
- Whether the scheme can predict nominal, numeric, string, date or relational class attributes.
- Whether the scheme can handle numeric predictor attributes
- Whether the scheme can handle nominal predictor attributes
- Whether the scheme can handle string predictor attributes
- Whether the scheme can handle date predictor attributes
- Whether the scheme can handle relational predictor attributes
- Whether the scheme can handle multi-instance data
- Whether the scheme can handle missing predictor values
- Whether the scheme can handle missing class values
- Whether a nominal scheme only handles 2 class problems
- Whether the scheme can handle instance weights
- Correct functioning
- Correct initialisation during search (i.e. no result changes when search is performed repeatedly)
- Whether the scheme alters the data pased to it (number of instances, instance order, instance weights, etc)
- Degenerate cases
- building scheme with zero instances
- all but one predictor attribute values missing
- all predictor attribute values missing
- all but one class values missing
- all class values missing
weka.attributeSelection.AbstractAttributeSelectionTest
uses this class to test all the schemes. Any changes here, have to be
checked in that abstract test class, too.
Valid options are:
-D Turn on debugging output.
-S Silent mode - prints nothing to stdout.
-N <num> The number of instances in the datasets (default 20).
-nominal <num> The number of nominal attributes (default 2).
-nominal-values <num> The number of values for nominal attributes (default 1).
-numeric <num> The number of numeric attributes (default 1).
-string <num> The number of string attributes (default 1).
-date <num> The number of date attributes (default 1).
-relational <num> The number of relational attributes (default 1).
-num-instances-relational <num> The number of instances in relational/bag attributes (default 10).
-words <comma-separated-list> The words to use in string attributes.
-word-separators <chars> The word separators to use in string attributes.
-eval name [options] Full name and options of the evaluator analyzed. eg: weka.attributeSelection.CfsSubsetEval
-search name [options] Full name and options of the search method analyzed. eg: weka.attributeSelection.Ranker
-test <eval|search> The scheme to test, either the evaluator or the search method. (Default: eval)
Options specific to evaluator weka.attributeSelection.CfsSubsetEval:
-M Treat missing values as a seperate value.
-L Don't include locally predictive attributes.
Options specific to search method weka.attributeSelection.Ranker:
-P <start set> Specify a starting set of attributes. Eg. 1,3,5-7. Any starting attributes specified are ignored during the ranking.
-T <threshold> Specify a theshold by which attributes may be discarded from the ranking.
-N <num to select> Specify number of attributes to select
- 版本:
- $Revision: 4783 $
- 作者:
- Len Trigg (trigg@cs.waikato.ac.nz), FracPete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 weka.core.CheckScheme
CheckScheme.PostProcessor
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
doTests()
Begin the tests, reporting results to System.outGet the current evaluatorString[]
Gets the current settings of the CheckAttributeSelection.Returns the revision string.Get the current search methodboolean
Gets whether the evaluator is being tested or the search method.Returns an enumeration describing the available options.static void
Test method for this classvoid
setEvaluator
(ASEvaluation value) Set the evaluator to test.void
setOptions
(String[] options) Parses a given list of options.void
Set the search method to test.void
setTestEvaluator
(boolean value) Sets whether the evaluator or the search method is being tested.从类继承的方法 weka.core.CheckScheme
attributeTypeToString, getNumDate, getNumInstances, getNumInstancesRelational, getNumNominal, getNumNumeric, getNumRelational, getNumString, getPostProcessor, getWords, getWordSeparators, hasClasspathProblems, setNumDate, setNumInstances, setNumInstancesRelational, setNumNominal, setNumNumeric, setNumRelational, setNumString, setPostProcessor, setWords, setWordSeparators
-
构造器详细资料
-
CheckAttributeSelection
public CheckAttributeSelection()
-
-
方法详细资料
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中CheckScheme
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. Valid options are:-D Turn on debugging output.
-S Silent mode - prints nothing to stdout.
-N <num> The number of instances in the datasets (default 20).
-nominal <num> The number of nominal attributes (default 2).
-nominal-values <num> The number of values for nominal attributes (default 1).
-numeric <num> The number of numeric attributes (default 1).
-string <num> The number of string attributes (default 1).
-date <num> The number of date attributes (default 1).
-relational <num> The number of relational attributes (default 1).
-num-instances-relational <num> The number of instances in relational/bag attributes (default 10).
-words <comma-separated-list> The words to use in string attributes.
-word-separators <chars> The word separators to use in string attributes.
-eval name [options] Full name and options of the evaluator analyzed. eg: weka.attributeSelection.CfsSubsetEval
-search name [options] Full name and options of the search method analyzed. eg: weka.attributeSelection.Ranker
-test <eval|search> The scheme to test, either the evaluator or the search method. (Default: eval)
Options specific to evaluator weka.attributeSelection.CfsSubsetEval:
-M Treat missing values as a seperate value.
-L Don't include locally predictive attributes.
Options specific to search method weka.attributeSelection.Ranker:
-P <start set> Specify a starting set of attributes. Eg. 1,3,5-7. Any starting attributes specified are ignored during the ranking.
-T <threshold> Specify a theshold by which attributes may be discarded from the ranking.
-N <num to select> Specify number of attributes to select
- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中CheckScheme
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the CheckAttributeSelection.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中CheckScheme
- 返回:
- an array of strings suitable for passing to setOptions
-
doTests
public void doTests()Begin the tests, reporting results to System.out- 指定者:
doTests
在类中CheckScheme
-
setEvaluator
Set the evaluator to test.- 参数:
value
- the evaluator to use.
-
getEvaluator
Get the current evaluator- 返回:
- the current evaluator
-
setSearch
Set the search method to test.- 参数:
value
- the search method to use.
-
getSearch
Get the current search method- 返回:
- the current search method
-
setTestEvaluator
public void setTestEvaluator(boolean value) Sets whether the evaluator or the search method is being tested.- 参数:
value
- if true then the evaluator will be tested
-
getTestEvaluator
public boolean getTestEvaluator()Gets whether the evaluator is being tested or the search method.- 返回:
- true if the evaluator is being tested
-
getRevision
Returns the revision string.- 返回:
- the revision
-
main
Test method for this class- 参数:
args
- the commandline parameters
-