Class LimAttClassifier

  • All Implemented Interfaces:
    Configurable, Serializable, CapabilitiesHandler, Classifier, MultiClassClassifier, AWTRenderable, Learner<Example<Instance>>, MOAObject, OptionHandler

    public class LimAttClassifier
    extends AbstractClassifier
    implements MultiClassClassifier
    Ensemble Combining Restricted Hoeffding Trees using Stacking. It produces a classification model based on an ensemble of restricted decision trees, where each tree is built from a distinct subset of the attributes. The overall model is formed by combining the log-odds of the predicted class probabilities of these trees using sigmoid perceptrons, with one perceptron per class. In contrast to the standard boosting approach, which forms an ensemble classifier in a greedy fashion, building each tree in sequence and assigning corresponding weights as a by-product, our method generates each tree in parallel and combines them using perceptron classifiers by adopting the stacking approach. For more information see,

    Albert Bifet, Eibe Frank, Geoffrey Holmes, Bernhard Pfahringer: Accurate Ensembles for Data Streams: Combining Restricted Hoeffding Trees using Stacking. Journal of Machine Learning Research - Proceedings Track 13: 225-240 (2010) BibTeX:
     @article{BifetFHP10,
     author    = {Albert Bifet and
                  Eibe Frank and
                  Geoffrey Holmes and
                  Bernhard Pfahringer},
     title     = {Accurate Ensembles for Data Streams: Combining Restricted
                  Hoeffding Trees using Stacking},
     journal   = {Journal of Machine Learning Research - Proceedings Track},
     volume    = {13},
     year      = {2010},
     pages     = {225-240}
     }
     

    Version:
    $Revision: 7 $
    Author:
    Albert Bifet (abifet at cs dot waikato dot ac dot nz), Eibe Frank (eibe{[at]}cs{[dot]}waikato{[dot]}ac{[dot]}nz)
    See Also:
    Serialized Form
    • Field Detail

      • baseLearnerOption

        public ClassOption baseLearnerOption
      • numAttributesOption

        public IntOption numAttributesOption
      • weightShrinkOption

        public FloatOption weightShrinkOption
      • deltaAdwinOption

        public FloatOption deltaAdwinOption
      • oddsOffsetOption

        public FloatOption oddsOffsetOption
      • bigTreesOption

        public FlagOption bigTreesOption
      • numEnsemblePruningOption

        public IntOption numEnsemblePruningOption
      • adwinReplaceWorstClassifierOption

        public FlagOption adwinReplaceWorstClassifierOption
      • ADError

        protected ADWIN[] ADError
      • numberOfChangesDetected

        protected int numberOfChangesDetected
      • matrixCodes

        protected int[][] matrixCodes
      • initMatrixCodes

        protected boolean initMatrixCodes
      • initClassifiers

        protected boolean initClassifiers
      • numberAttributes

        protected int numberAttributes
      • numInstances

        protected int numInstances
      • learningRatioOption

        public FloatOption learningRatioOption
      • penaltyFactorOption

        public FloatOption penaltyFactorOption
      • initialNumInstancesOption

        public IntOption initialNumInstancesOption
      • weightAttribute

        protected double[][] weightAttribute
      • reset

        protected boolean reset
    • Constructor Detail

      • LimAttClassifier

        public LimAttClassifier()
    • Method Detail

      • resetLearningImpl

        public void resetLearningImpl()
        Description copied from class: AbstractClassifier
        Resets this classifier. It must be similar to starting a new classifier from scratch.

        The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. Note that this will produce compiler errors if not overridden.
        Specified by:
        resetLearningImpl in class AbstractClassifier
      • trainOnInstanceImpl

        public void trainOnInstanceImpl​(Instance inst)
        Description copied from class: AbstractClassifier
        Trains this classifier incrementally using the given instance.

        The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. Note that this will produce compiler errors if not overridden.
        Specified by:
        trainOnInstanceImpl in class AbstractClassifier
        Parameters:
        inst - the instance to be used for training
      • getVotesForInstance

        public double[] getVotesForInstance​(Instance inst)
        Description copied from interface: Classifier
        Predicts the class memberships for a given instance. If an instance is unclassified, the returned array elements must be all zero.
        Specified by:
        getVotesForInstance in interface Classifier
        Specified by:
        getVotesForInstance in class AbstractClassifier
        Parameters:
        inst - the instance to be classified
        Returns:
        an array containing the estimated membership probabilities of the test instance in each class
      • isRandomizable

        public boolean isRandomizable()
        Description copied from interface: Learner
        Gets whether this learner needs a random seed. Examples of methods that needs a random seed are bagging and boosting.
        Specified by:
        isRandomizable in interface Learner<Example<Instance>>
        Returns:
        true if the learner needs a random seed.
      • getModelDescription

        public void getModelDescription​(StringBuilder out,
                                        int indent)
        Description copied from class: AbstractClassifier
        Returns a string representation of the model.
        Specified by:
        getModelDescription in class AbstractClassifier
        Parameters:
        out - the stringbuilder to add the description
        indent - the number of characters to indent
      • getModelMeasurementsImpl

        protected Measurement[] getModelMeasurementsImpl()
        Description copied from class: AbstractClassifier
        Gets the current measurements of this classifier.

        The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. Note that this will produce compiler errors if not overridden.
        Specified by:
        getModelMeasurementsImpl in class AbstractClassifier
        Returns:
        an array of measurements to be used in evaluation tasks
      • trainOnInstanceImplPerceptron

        public void trainOnInstanceImplPerceptron​(int numClasses,
                                                  int actualClass,
                                                  double[][] votes)
      • predictionPruning

        public double predictionPruning​(double[][] votes,
                                        int[] bestClassifiers,
                                        int classVal)
      • prediction

        public double prediction​(double[][] votes,
                                 int classVal)
      • getVotesForInstancePerceptron

        public double[] getVotesForInstancePerceptron​(double[][] votesEnsemble,
                                                      int[] bestClassifiers,
                                                      int numClasses)