Documentation of 'jsat.classifiers.boosting.AdaBoostM1' Java class
AdaBoostM1
jsat.classifiers.boosting

Class AdaBoostM1

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Classifier, Parameterized


    public class AdaBoostM1
    extends java.lang.Object
    implements Classifier, Parameterized
    Implementation of Experiments with a New Boosting Algorithm, by Yoav Freund&Robert E. Schapire.
    This is the first AdaBoost algorithm presented in the paper, and the first boosting algorithm. Though not often mentioned, AdaBoost does support non binary classification tasks. However, for any k labels, the weak learner's error still needs to be better then 1/2, which is not an easy requirement to satisfy. For this reason, many use AdaBoostM1 by reducing k class classification problems to several 2 class problems.

    Many Boosting methods, when given a binary classification task, reduce to having the same results as this class.

    AdaBoost is often combined with OneVSAll to obtain better classification accuracy.
    See Also:
    Serialized Form
    • Constructor Detail

      • AdaBoostM1

        public AdaBoostM1(Classifier weakLearner,
                          int maxIterations)
      • AdaBoostM1

        public AdaBoostM1(AdaBoostM1 toCopy)
    • Method Detail

      • getMaxIterations

        public int getMaxIterations()
        Returns the maximum number of iterations used
        Returns:
        the maximum number of iterations used
      • getModels

        public java.util.List<Classifier> getModels()
        Returns:
        a list of the models that are in this ensemble.
      • getModelWeights

        public java.util.List<java.lang.Double> getModelWeights()
        Returns:
        a list of the models weights that are in this ensemble.
      • setMaxIterations

        public void setMaxIterations(int maxIterations)
        Sets the maximal number of boosting iterations that may be performed
        Parameters:
        maxIterations - the maximum number of iterations
      • getWeakLearner

        public Classifier getWeakLearner()
        Returns the weak learner currently being used by this method.
        Returns:
        the weak learner currently being used by this method.
      • setWeakLearner

        public void setWeakLearner(Classifier weakLearner)
        Sets the weak learner used during training.
        Parameters:
        weakLearner - the weak learner to use
      • classify

        public CategoricalResults classify(DataPoint data)
        Description copied from interface: Classifier
        Performs classification on the given data point.
        Specified by:
        classify in interface Classifier
        Parameters:
        data - the data point to classify
        Returns:
        the results of the classification.
      • train

        public void train(ClassificationDataSet dataSet,
                          boolean parallel)
        Description copied from interface: Classifier
        Trains the classifier and constructs a model for classification using the given data set. If the training method knows how, it will used the threadPool to conduct training in parallel. This method will block until the training has completed.
        Specified by:
        train in interface Classifier
        Parameters:
        dataSet - the data set to train on
        parallel - true if multiple threads should be used to train the model. false if it should be done in a single threaded manner.
      • supportsWeightedData

        public boolean supportsWeightedData()
        Description copied from interface: Classifier
        Indicates whether the model knows how to train using weighted data points. If it does, the model will train assuming the weights. The values returned by this method may change depending on the parameters set for the model.
        Specified by:
        supportsWeightedData in interface Classifier
        Returns:
        true if the model supports weighted data, false otherwise
      • clone

        public AdaBoostM1 clone()
        Specified by:
        clone in interface Classifier
        Overrides:
        clone in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.