public class Bagging
extends java.lang.Object
public int size
public int[][] samples
public Bagging(int k, int[] y, int[] classWeight, double subsample)
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.