All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.classifiers.meta.MultiBoostAB
java.lang.Object
|
+----weka.classifiers.Classifier
|
+----weka.classifiers.DistributionClassifier
|
+----weka.classifiers.meta.MultiBoostAB
- public class MultiBoostAB
- extends DistributionClassifier
- implements OptionHandler, WeightedInstancesHandler, Sourcable
Class for boosting a classifier using the MultiBoosting method.
MultiBoosting is an extension to the highly successful AdaBoost technique
for forming decision committees. MultiBoosting can be viewed as combining
AdaBoost with wagging. It is able to harness both AdaBoost's high bias and
variance reduction with wagging's superior variance reduction. Using C4.5
as the base learning algorithm, Multi-boosting is demonstrated to produce
decision committees with lower error than either AdaBoost or wagging
significantly more often than the reverse over a large representative cross-section
of UCI data sets. It offers the further advantage over AdaBoost of suiting parallel execution.
For more information, see
Geoffrey I. Webb (2000). MultiBoosting: A Technique for Combining Boosting and Wagging.
Machine Learning, 40(2): 159-196, Kluwer Academic Publishers, Boston
Valid options are:
-D
Turn on debugging output.
-W classname
Specify the full class name of a classifier as the basis for
boosting (required).
-I num
Set the number of boost iterations (default 10).
-P num
Set the percentage of weight mass used to build classifiers
(default 100).
-Q
Use resampling instead of reweighting.
-S seed
Random number seed for resampling (default 1).
-C subcommittees
Number of sub-committees. (Default 3),
Options after -- are passed to the designated classifier.
- Version:
- $Revision: 1.2 $
- Author:
- Shane Butler (sbutle@deakin.edu.au)
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- Author:
- Len Trigg (trigg@cs.waikato.ac.nz)
MultiBoostAB()
-
buildClassifier(Instances)
- Boosting method.
distributionForInstance(Instance)
- Calculates the class membership probabilities for the given test instance.
getClassifier()
- Get the classifier used as the classifier
getDebug()
- Get whether debugging is turned on
getMaxIterations()
- Get the maximum number of boost iterations
getNumSubCmtys()
- Get the number of sub committees to use
getOptions()
- Gets the current settings of the Classifier.
getSeed()
- Get seed for resampling.
getUseResampling()
- Get whether resampling is turned on
getWeightThreshold()
- Get the degree of weight thresholding
listOptions()
- Returns an enumeration describing the available options
main(String[])
- Main method for testing this class.
setClassifier(Classifier)
- Set the classifier for boosting.
setDebug(boolean)
- Set debugging mode
setMaxIterations(int)
- Set the maximum number of boost iterations
setNumSubCmtys(int)
- Set the number of sub committees to use
setOptions(String[])
- Parses a given list of options.
setSeed(int)
- Set seed for resampling.
setUseResampling(boolean)
- Set resampling mode
setWeightThreshold(int)
- Set weight threshold
toSource(String)
- Returns the boosted model as Java source code.
toString()
- Returns description of the boosted classifier.
MultiBoostAB
public MultiBoostAB()
listOptions
public java.util.Enumeration listOptions()
Returns an enumeration describing the available options
- Returns:
- an enumeration of all the available options
setOptions
public void setOptions(java.lang.String options[]) throws java.lang.Exception
Parses a given list of options. Valid options are:
-D
Turn on debugging output.
-W classname
Specify the full class name of a classifier as the basis for
boosting (required).
-I num
Set the number of boost iterations (default 10).
-P num
Set the percentage of weight mass used to build classifiers
(default 100).
-Q
Use resampling instead of reweighting.
-S seed
Random number seed for resampling (default 1).
-C subcommittees
Number of sub-committees. (Default 3),
Options after -- are passed to the designated classifier.
- Parameters:
options - the list of options as an array of strings
- Throws:
- java.lang.Exception - if an option is not supported
getOptions
public java.lang.String[] getOptions()
Gets the current settings of the Classifier.
- Returns:
- an array of strings suitable for passing to setOptions
setClassifier
public void setClassifier(Classifier newClassifier)
Set the classifier for boosting.
- Parameters:
newClassifier - the Classifier to use.
getClassifier
public Classifier getClassifier()
Get the classifier used as the classifier
- Returns:
- the classifier used as the classifier
setMaxIterations
public void setMaxIterations(int maxIterations)
Set the maximum number of boost iterations
getMaxIterations
public int getMaxIterations()
Get the maximum number of boost iterations
- Returns:
- the maximum number of boost iterations
setWeightThreshold
public void setWeightThreshold(int threshold)
Set weight threshold
- Parameters:
thresholding - the percentage of weight mass used for training
getWeightThreshold
public int getWeightThreshold()
Get the degree of weight thresholding
- Returns:
- the percentage of weight mass used for training
setSeed
public void setSeed(int seed)
Set seed for resampling.
- Parameters:
seed - the seed for resampling
getSeed
public int getSeed()
Get seed for resampling.
- Returns:
- the seed for resampling
setNumSubCmtys
public void setNumSubCmtys(int subc)
Set the number of sub committees to use
- Parameters:
seed - the seed for resampling
getNumSubCmtys
public int getNumSubCmtys()
Get the number of sub committees to use
- Returns:
- the seed for resampling
setDebug
public void setDebug(boolean debug)
Set debugging mode
- Parameters:
debug - true if debug output should be printed
getDebug
public boolean getDebug()
Get whether debugging is turned on
- Returns:
- true if debugging output is on
setUseResampling
public void setUseResampling(boolean r)
Set resampling mode
- Parameters:
resampling - true if resampling should be done
getUseResampling
public boolean getUseResampling()
Get whether resampling is turned on
- Returns:
- true if resampling output is on
buildClassifier
public void buildClassifier(Instances data) throws java.lang.Exception
Boosting method.
- Parameters:
data - the training data to be used for generating the
boosted classifier.
- Throws:
- java.lang.Exception - if the classifier could not be built successfully
- Overrides:
- buildClassifier in class Classifier
distributionForInstance
public double[] distributionForInstance(Instance instance) throws java.lang.Exception
Calculates the class membership probabilities for the given test instance.
- Parameters:
instance - the instance to be classified
- Returns:
- predicted class probability distribution
- Throws:
- java.lang.Exception - if instance could not be classified
successfully
- Overrides:
- distributionForInstance in class DistributionClassifier
toSource
public java.lang.String toSource(java.lang.String className) throws java.lang.Exception
Returns the boosted model as Java source code.
- Returns:
- the tree as Java source code
- Throws:
- java.lang.Exception - if something goes wrong
toString
public java.lang.String toString()
Returns description of the boosted classifier.
- Returns:
- description of the boosted classifier as a string
- Overrides:
- toString in class java.lang.Object
main
public static void main(java.lang.String argv[])
Main method for testing this class.
- Parameters:
argv - the options
All Packages Class Hierarchy This Package Previous Next Index WEKA's home