类 WrapperSubsetEval
java.lang.Object
weka.attributeSelection.ASEvaluation
weka.attributeSelection.WrapperSubsetEval
- 所有已实现的接口:
Serializable
,SubsetEvaluator
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
,TechnicalInformationHandler
public class WrapperSubsetEval
extends ASEvaluation
implements SubsetEvaluator, OptionHandler, TechnicalInformationHandler
WrapperSubsetEval:
Evaluates attribute sets by using a learning scheme. Cross validation is used to estimate the accuracy of the learning scheme for a set of attributes.
For more information see:
Ron Kohavi, George H. John (1997). Wrappers for feature subset selection. Artificial Intelligence. 97(1-2):273-324. BibTeX:
Evaluates attribute sets by using a learning scheme. Cross validation is used to estimate the accuracy of the learning scheme for a set of attributes.
For more information see:
Ron Kohavi, George H. John (1997). Wrappers for feature subset selection. Artificial Intelligence. 97(1-2):273-324. BibTeX:
@article{Kohavi1997, author = {Ron Kohavi and George H. John}, journal = {Artificial Intelligence}, note = {Special issue on relevance}, number = {1-2}, pages = {273-324}, title = {Wrappers for feature subset selection}, volume = {97}, year = {1997}, ISSN = {0004-3702} }Valid options are:
-B <base learner> class name of base learner to use for accuracy estimation. Place any classifier options LAST on the command line following a "--". eg.: -B weka.classifiers.bayes.NaiveBayes ... -- -K (default: weka.classifiers.rules.ZeroR)
-F <num> number of cross validation folds to use for estimating accuracy. (default=5)
-R <seed> Seed for cross validation accuracy testimation. (default = 1)
-T <num> threshold by which to execute another cross validation (standard deviation---expressed as a percentage of the mean). (default: 0.01 (1%))
Options specific to scheme weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
- 版本:
- $Revision: 11851 $
- 作者:
- Mark Hall (mhall@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildEvaluator
(Instances data) Generates a attribute evaluator.Returns the tip text for this propertyvoid
clean()
Tells the evaluator that the attribute selection process is complete.double
evaluateSubset
(BitSet subset) Evaluates a subset of attributesReturns the tip text for this propertyReturns the capabilities of this evaluator.Get the classifier used as the base learner.int
getFolds()
Get the number of folds used for accuracy estimationString[]
Gets the current settings of WrapperSubsetEval.Returns the revision string.int
getSeed()
Get the random number seed used for cross validationReturns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.double
Get the value of the thresholdReturns a string describing this attribute evaluatorReturns an enumeration describing the available options.static void
Main method for testing this class.Returns the tip text for this propertyvoid
setClassifier
(Classifier newClassifier) Set the classifier to use for accuracy estimationvoid
setFolds
(int f) Set the number of folds to use for accuracy estimationvoid
setOptions
(String[] options) Parses a given list of options.void
setSeed
(int s) Set the seed to use for cross validationvoid
setThreshold
(double t) Set the value of the threshold for repeating cross validationReturns the tip text for this propertytoString()
Returns a string describing the wrapper从类继承的方法 weka.attributeSelection.ASEvaluation
forName, makeCopies, postProcess
-
构造器详细资料
-
WrapperSubsetEval
public WrapperSubsetEval()Constructor. Calls restOptions to set default options
-
-
方法详细资料
-
globalInfo
Returns a string describing this attribute evaluator- 返回:
- a description of the evaluator suitable for displaying in the explorer/experimenter gui
-
getTechnicalInformation
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.- 指定者:
getTechnicalInformation
在接口中TechnicalInformationHandler
- 返回:
- the technical information about this class
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. Valid options are:-B <base learner> class name of base learner to use for accuracy estimation. Place any classifier options LAST on the command line following a "--". eg.: -B weka.classifiers.bayes.NaiveBayes ... -- -K (default: weka.classifiers.rules.ZeroR)
-F <num> number of cross validation folds to use for estimating accuracy. (default=5)
-R <seed> Seed for cross validation accuracy testimation. (default = 1)
-T <num> threshold by which to execute another cross validation (standard deviation---expressed as a percentage of the mean). (default: 0.01 (1%))
Options specific to scheme weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
- 指定者:
setOptions
在接口中OptionHandler
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
thresholdTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setThreshold
public void setThreshold(double t) Set the value of the threshold for repeating cross validation- 参数:
t
- the value of the threshold
-
getThreshold
public double getThreshold()Get the value of the threshold- 返回:
- the threshold as a double
-
foldsTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setFolds
public void setFolds(int f) Set the number of folds to use for accuracy estimation- 参数:
f
- the number of folds
-
getFolds
public int getFolds()Get the number of folds used for accuracy estimation- 返回:
- the number of folds
-
seedTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setSeed
public void setSeed(int s) Set the seed to use for cross validation- 参数:
s
- the seed
-
getSeed
public int getSeed()Get the random number seed used for cross validation- 返回:
- the seed
-
classifierTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setClassifier
Set the classifier to use for accuracy estimation- 参数:
newClassifier
- the Classifier to use.
-
getClassifier
Get the classifier used as the base learner.- 返回:
- the classifier used as the classifier
-
getOptions
Gets the current settings of WrapperSubsetEval.- 指定者:
getOptions
在接口中OptionHandler
- 返回:
- an array of strings suitable for passing to setOptions()
-
getCapabilities
Returns the capabilities of this evaluator.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中ASEvaluation
- 返回:
- the capabilities of this evaluator
- 另请参阅:
-
buildEvaluator
Generates a attribute evaluator. Has to initialize all fields of the evaluator that are not being set via options.- 指定者:
buildEvaluator
在类中ASEvaluation
- 参数:
data
- set of instances serving as training data- 抛出:
Exception
- if the evaluator has not been generated successfully
-
evaluateSubset
Evaluates a subset of attributes- 指定者:
evaluateSubset
在接口中SubsetEvaluator
- 参数:
subset
- a bitset representing the attribute subset to be evaluated- 返回:
- the error rate
- 抛出:
Exception
- if the subset could not be evaluated
-
toString
Returns a string describing the wrapper -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中ASEvaluation
- 返回:
- the revision
-
clean
public void clean()从类复制的说明:ASEvaluation
Tells the evaluator that the attribute selection process is complete. It can then clean up data structures, references to training data as necessary in order to save memory- 覆盖:
clean
在类中ASEvaluation
-
main
Main method for testing this class.- 参数:
args
- the options
-