Catalano.MachineLearning.Regression
Class BaggingLearning
- java.lang.Object
-
- Catalano.MachineLearning.Regression.BaggingLearning
-
- All Implemented Interfaces:
- IRegression, java.lang.Cloneable
public class BaggingLearning extends java.lang.Object implements IRegression
Bagging Learning (Bootstrap aggregation). Bootstrap aggregating, also called bagging, is a machine learning ensemble meta-algorithm designed to improve the stability and accuracy of machine learning algorithms used in statistical classification and regression.
-
-
Constructor Summary
Constructors Constructor and Description BaggingLearning(IRegression regression)Initializes a new instance of the BaggingLearning class.BaggingLearning(IRegression regression, int times)Initializes a new instance of the BaggingLearning class.BaggingLearning(IRegression regression, int times, boolean includeAttributes)Initializes a new instance of the BaggingLearning class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description IRegressionclone()Clone of the object.booleanisIncludeAttributes()Check if features are drawn with replacement.voidLearn(DatasetRegression dataset)Learn.voidLearn(double[][] input, double[] output)Learn.doublePredict(double[] sample)Predict.voidsetIncludeAttributes(boolean includeAttributes)Set attributes in the bagging model.
-
-
-
Constructor Detail
-
BaggingLearning
public BaggingLearning(IRegression regression)
Initializes a new instance of the BaggingLearning class.- Parameters:
regression- Regression.
-
BaggingLearning
public BaggingLearning(IRegression regression, int times)
Initializes a new instance of the BaggingLearning class.- Parameters:
regression- Regression.times- Times to train.
-
BaggingLearning
public BaggingLearning(IRegression regression, int times, boolean includeAttributes)
Initializes a new instance of the BaggingLearning class.- Parameters:
regression- regression.times- Times to train.includeAttributes- Include attributes in the bagging process.
-
-
Method Detail
-
isIncludeAttributes
public boolean isIncludeAttributes()
Check if features are drawn with replacement.- Returns:
- True, if the feature are included, otherwise false.
-
setIncludeAttributes
public void setIncludeAttributes(boolean includeAttributes)
Set attributes in the bagging model.- Parameters:
includeAttributes- True, if the feature are included, otherwise false.
-
Learn
public void Learn(DatasetRegression dataset)
Description copied from interface:IRegressionLearn.- Specified by:
Learnin interfaceIRegression- Parameters:
dataset- Dataset regression.
-
Learn
public void Learn(double[][] input, double[] output)Description copied from interface:IRegressionLearn.- Specified by:
Learnin interfaceIRegression- Parameters:
input- Input.output- Output.
-
Predict
public double Predict(double[] sample)
Description copied from interface:IRegressionPredict.- Specified by:
Predictin interfaceIRegression- Parameters:
sample- Feature.- Returns:
- Value.
-
clone
public IRegression clone()
Description copied from interface:IRegressionClone of the object.- Specified by:
clonein interfaceIRegression- Overrides:
clonein classjava.lang.Object- Returns:
- A new copy of the object.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG