public class BaggingLearning extends java.lang.Object implements IClassifier
| Constructor and Description |
|---|
BaggingLearning(IClassifier classifier)
Initializes a new instance of the BaggingLearning class.
|
BaggingLearning(IClassifier classifier,
int times)
Initializes a new instance of the BaggingLearning class.
|
BaggingLearning(IClassifier classifier,
int times,
boolean includeAttributes)
Initializes a new instance of the BaggingLearning class.
|
| Modifier and Type | Method and Description |
|---|---|
IClassifier |
clone()
Clone of the object.
|
boolean |
isIncludeAttributes()
Check if features are drawn with replacement.
|
void |
Learn(DatasetClassification dataset)
Learn from a dataset.
|
void |
Learn(double[][] input,
int[] labels)
Learn.
|
int |
Predict(double[] sample)
Predict.
|
void |
setIncludeAttributes(boolean includeAttributes)
Set attributes in the bagging model.
|
public BaggingLearning(IClassifier classifier)
classifier - Classifier.public BaggingLearning(IClassifier classifier, int times)
classifier - Classifier.times - Times to train.public BaggingLearning(IClassifier classifier, int times, boolean includeAttributes)
classifier - Classifier.times - Times to train.includeAttributes - Include attributes in the bagging process.public boolean isIncludeAttributes()
public void setIncludeAttributes(boolean includeAttributes)
includeAttributes - True, if the feature are included, otherwise false.public void Learn(DatasetClassification dataset)
IClassifierLearn in interface IClassifierdataset - Dataset.public void Learn(double[][] input,
int[] labels)
IClassifierLearn in interface IClassifierinput - Matrix of features.labels - Labels.public int Predict(double[] sample)
IClassifierPredict in interface IClassifiersample - Feature.public IClassifier clone()
IClassifierclone in interface IClassifierclone in class java.lang.Object