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

Class Wagging

    • Constructor Detail

      • Wagging

        public Wagging(ContinuousDistribution dist,
                       Classifier weakL,
                       int iterations)
        Creates a new Wagging classifier
        Parameters:
        dist - the distribution to select weights from
        weakL - the weak learner to use
        iterations - the number of iterations to perform
      • Wagging

        public Wagging(ContinuousDistribution dist,
                       Regressor weakR,
                       int iterations)
        Creates a new Wagging regressor
        Parameters:
        dist - the distribution to select weights from
        weakR - the weak learner to use
        iterations - the number of iterations to perform
    • Method Detail

      • setWeakLearner

        public void setWeakLearner(Classifier weakL)
        Sets the weak learner used for classification. If it also supports regressions that will be set as well.
        Parameters:
        weakL - the weak learner to use
      • getWeakClassifier

        public Classifier getWeakClassifier()
        Returns the weak learner used for classification.
        Returns:
        the weak learner used for classification.
      • setWeakLearner

        public void setWeakLearner(Regressor weakR)
        Sets the weak learner used for regressions . If it also supports classification that will be set as well.
        Parameters:
        weakR - the weak learner to use
      • getWeakRegressor

        public Regressor getWeakRegressor()
        Returns the weak learner used for regression
        Returns:
        the weak learner used for regression
      • setIterations

        public void setIterations(int iterations)
        Sets the number of iterations to create weak learners
        Parameters:
        iterations - the number of iterations to perform
      • getIterations

        public int getIterations()
        Returns the number of iterations to create weak learners
        Returns:
        the number of iterations to perform
      • setDistribution

        public void setDistribution(ContinuousDistribution dist)
        Sets the distribution to select the random weights from
        Parameters:
        dist - the distribution to use
      • getDistribution

        public ContinuousDistribution getDistribution()
        Returns the distribution used for weight sampling
        Returns:
        the distribution used
      • 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
        Specified by:
        supportsWeightedData in interface Regressor
        Returns:
        true if the model supports weighted data, false otherwise

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.