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)

Constructor Index

 o MultiBoostAB()
 

Method Index

 o buildClassifier(Instances)
Boosting method.
 o distributionForInstance(Instance)
Calculates the class membership probabilities for the given test instance.
 o getClassifier()
Get the classifier used as the classifier
 o getDebug()
Get whether debugging is turned on
 o getMaxIterations()
Get the maximum number of boost iterations
 o getNumSubCmtys()
Get the number of sub committees to use
 o getOptions()
Gets the current settings of the Classifier.
 o getSeed()
Get seed for resampling.
 o getUseResampling()
Get whether resampling is turned on
 o getWeightThreshold()
Get the degree of weight thresholding
 o listOptions()
Returns an enumeration describing the available options
 o main(String[])
Main method for testing this class.
 o setClassifier(Classifier)
Set the classifier for boosting.
 o setDebug(boolean)
Set debugging mode
 o setMaxIterations(int)
Set the maximum number of boost iterations
 o setNumSubCmtys(int)
Set the number of sub committees to use
 o setOptions(String[])
Parses a given list of options.
 o setSeed(int)
Set seed for resampling.
 o setUseResampling(boolean)
Set resampling mode
 o setWeightThreshold(int)
Set weight threshold
 o toSource(String)
Returns the boosted model as Java source code.
 o toString()
Returns description of the boosted classifier.

Constructor Detail

 o MultiBoostAB
public MultiBoostAB()

Method Detail

 o listOptions
public java.util.Enumeration listOptions()
          Returns an enumeration describing the available options
Returns:
an enumeration of all the available options
 o 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
 o getOptions
public java.lang.String[] getOptions()
          Gets the current settings of the Classifier.
Returns:
an array of strings suitable for passing to setOptions
 o setClassifier
public void setClassifier(Classifier newClassifier)
          Set the classifier for boosting.
Parameters:
newClassifier - the Classifier to use.
 o getClassifier
public Classifier getClassifier()
          Get the classifier used as the classifier
Returns:
the classifier used as the classifier
 o setMaxIterations
public void setMaxIterations(int maxIterations)
          Set the maximum number of boost iterations
 o getMaxIterations
public int getMaxIterations()
          Get the maximum number of boost iterations
Returns:
the maximum number of boost iterations
 o setWeightThreshold
public void setWeightThreshold(int threshold)
          Set weight threshold
Parameters:
thresholding - the percentage of weight mass used for training
 o getWeightThreshold
public int getWeightThreshold()
          Get the degree of weight thresholding
Returns:
the percentage of weight mass used for training
 o setSeed
public void setSeed(int seed)
          Set seed for resampling.
Parameters:
seed - the seed for resampling
 o getSeed
public int getSeed()
          Get seed for resampling.
Returns:
the seed for resampling
 o setNumSubCmtys
public void setNumSubCmtys(int subc)
          Set the number of sub committees to use
Parameters:
seed - the seed for resampling
 o getNumSubCmtys
public int getNumSubCmtys()
          Get the number of sub committees to use
Returns:
the seed for resampling
 o setDebug
public void setDebug(boolean debug)
          Set debugging mode
Parameters:
debug - true if debug output should be printed
 o getDebug
public boolean getDebug()
          Get whether debugging is turned on
Returns:
true if debugging output is on
 o setUseResampling
public void setUseResampling(boolean r)
          Set resampling mode
Parameters:
resampling - true if resampling should be done
 o getUseResampling
public boolean getUseResampling()
          Get whether resampling is turned on
Returns:
true if resampling output is on
 o 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
 o 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
 o 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
 o 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
 o 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