Documentation of 'smile.sampling.Bagging' Java class
Bagging
smile.sampling

Class Bagging



  • public class Bagging
    extends java.lang.Object
    Bagging (Bootstrap aggregating) is a way to improve the classification by combining classifications of randomly generated training sets.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      int[][] samples
      Samples.
      int size
      The number of samples in this bag.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Bagging(int k, int[] y, int[] classWeight, double subsample)
      Stratified sampling.
    • Method Summary

      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • size

        public int size
        The number of samples in this bag.
      • samples

        public int[][] samples
        Samples. The first column is the sample index while the second column is the number of samples.
    • Constructor Detail

      • Bagging

        public Bagging(int k,
                       int[] y,
                       int[] classWeight,
                       double subsample)
        Stratified sampling.
        Parameters:
        k - the number of classes.
        y - class labels.
        classWeight - Priors of the classes. The weight of each class is roughly the ratio of samples in each class. For example, if there are 400 positive samples and 100 negative samples, the classWeight should be [1, 4] (assuming label 0 is of negative, label 1 is of positive).
        subsample - sampling rate. Draw samples with replacement if it is 1.0.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.