类 AdaBoostM1
- 所有已实现的接口:
Serializable
,Cloneable
,Sourcable
,CapabilitiesHandler
,OptionHandler
,Randomizable
,RevisionHandler
,TechnicalInformationHandler
,WeightedInstancesHandler
- 直接已知子类:
MultiBoostAB
public class AdaBoostM1
extends RandomizableIteratedSingleClassifierEnhancer
implements WeightedInstancesHandler, Sourcable, TechnicalInformationHandler
Class for boosting a nominal class classifier using the Adaboost M1 method. Only nominal class problems can be tackled. Often dramatically improves performance, but sometimes overfits.
For more information, see
Yoav Freund, Robert E. Schapire: Experiments with a new boosting algorithm. In: Thirteenth International Conference on Machine Learning, San Francisco, 148-156, 1996. BibTeX:
For more information, see
Yoav Freund, Robert E. Schapire: Experiments with a new boosting algorithm. In: Thirteenth International Conference on Machine Learning, San Francisco, 148-156, 1996. BibTeX:
@inproceedings{Freund1996, address = {San Francisco}, author = {Yoav Freund and Robert E. Schapire}, booktitle = {Thirteenth International Conference on Machine Learning}, pages = {148-156}, publisher = {Morgan Kaufmann}, title = {Experiments with a new boosting algorithm}, year = {1996} }Valid options are:
-P <num> Percentage of weight mass to base training on. (default 100, reduce to around 90 speed up)
-Q Use resampling for boosting.
-S <num> Random number seed. (default 1)
-I <num> Number of iterations. (default 10)
-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (default: weka.classifiers.trees.DecisionStump)
Options specific to classifier weka.classifiers.trees.DecisionStump:
-D If set, classifier is run in debug mode and may output additional info to the consoleOptions after -- are passed to the designated classifier.
- 版本:
- $Revision: 1.40 $
- 作者:
- Eibe Frank (eibe@cs.waikato.ac.nz), Len Trigg (trigg@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances data) Boosting method.double[]
distributionForInstance
(Instance instance) Calculates the class membership probabilities for the given test instance.Returns default capabilities of the classifier.String[]
Gets the current settings of the Classifier.Returns the revision string.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.boolean
Get whether resampling is turned onint
Get the degree of weight thresholdingReturns a string describing classifierReturns an enumeration describing the available options.static void
Main method for testing this class.void
setOptions
(String[] options) Parses a given list of options.void
setUseResampling
(boolean r) Set resampling modevoid
setWeightThreshold
(int threshold) Set weight thresholdReturns the boosted model as Java source code.toString()
Returns description of the boosted classifier.Returns the tip text for this propertyReturns the tip text for this property从类继承的方法 weka.classifiers.RandomizableIteratedSingleClassifierEnhancer
getSeed, seedTipText, setSeed
从类继承的方法 weka.classifiers.IteratedSingleClassifierEnhancer
getNumIterations, numIterationsTipText, setNumIterations
从类继承的方法 weka.classifiers.SingleClassifierEnhancer
classifierTipText, getClassifier, setClassifier
从类继承的方法 weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
-
构造器详细资料
-
AdaBoostM1
public AdaBoostM1()Constructor.
-
-
方法详细资料
-
globalInfo
Returns a string describing classifier- 返回:
- a description 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
- 覆盖:
listOptions
在类中RandomizableIteratedSingleClassifierEnhancer
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. Valid options are:-P <num> Percentage of weight mass to base training on. (default 100, reduce to around 90 speed up)
-Q Use resampling for boosting.
-S <num> Random number seed. (default 1)
-I <num> Number of iterations. (default 10)
-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (default: weka.classifiers.trees.DecisionStump)
Options specific to classifier weka.classifiers.trees.DecisionStump:
-D If set, classifier is run in debug mode and may output additional info to the console
Options after -- are passed to the designated classifier.- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中RandomizableIteratedSingleClassifierEnhancer
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the Classifier.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中RandomizableIteratedSingleClassifierEnhancer
- 返回:
- an array of strings suitable for passing to setOptions
-
weightThresholdTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setWeightThreshold
public void setWeightThreshold(int threshold) Set weight threshold- 参数:
threshold
- the percentage of weight mass used for training
-
getWeightThreshold
public int getWeightThreshold()Get the degree of weight thresholding- 返回:
- the percentage of weight mass used for training
-
useResamplingTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setUseResampling
public void setUseResampling(boolean r) Set resampling mode- 参数:
r
- true if resampling should be done
-
getUseResampling
public boolean getUseResampling()Get whether resampling is turned on- 返回:
- true if resampling output is on
-
getCapabilities
Returns default capabilities of the classifier.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中SingleClassifierEnhancer
- 返回:
- the capabilities of this classifier
- 另请参阅:
-
buildClassifier
Boosting method.- 覆盖:
buildClassifier
在类中IteratedSingleClassifierEnhancer
- 参数:
data
- the training data to be used for generating the boosted classifier.- 抛出:
Exception
- if the classifier could not be built successfully
-
distributionForInstance
Calculates the class membership probabilities for the given test instance.- 覆盖:
distributionForInstance
在类中Classifier
- 参数:
instance
- the instance to be classified- 返回:
- predicted class probability distribution
- 抛出:
Exception
- if instance could not be classified successfully
-
toSource
Returns the boosted model as Java source code. -
toString
Returns description of the boosted classifier. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Main method for testing this class.- 参数:
argv
- the options
-