InputType
- The input type for supervised learning. Passed on to the internal
learning algorithm. Also the input type for the learned ensemble.@PublicationReference(title="Bagging Predictors", author="Leo Breiman", year=1996, type=Journal, publication="Machine Learning", pages={123,140}, url="http://www.springerlink.com/index/L4780124W2874025.pdf") public class BaggingRegressionLearner<InputType> extends AbstractBaggingLearner<InputType,java.lang.Double,Evaluator<? super InputType,? extends java.lang.Number>,AveragingEnsemble<InputType,Evaluator<? super InputType,? extends java.lang.Number>>>
BaggingCategorizerLearner
,
Serialized Formbag, dataInBag, dataList, DEFAULT_MAX_ITERATIONS, DEFAULT_PERCENT_TO_SAMPLE, ensemble, learner, percentToSample, random
data, keepGoing
maxIterations
DEFAULT_ITERATION, iteration
Constructor and Description |
---|
BaggingRegressionLearner()
Creates a new, empty
BaggingRegressionLearner . |
BaggingRegressionLearner(BatchLearner<? super java.util.Collection<? extends InputOutputPair<? extends InputType,java.lang.Double>>,? extends Evaluator<? super InputType,? extends java.lang.Number>> learner)
Creates a new instance of BaggingRegressionLearner.
|
BaggingRegressionLearner(BatchLearner<? super java.util.Collection<? extends InputOutputPair<? extends InputType,java.lang.Double>>,? extends Evaluator<? super InputType,? extends java.lang.Number>> learner,
int maxIterations,
double percentToSample,
java.util.Random random)
Creates a new instance of BaggingRegressionLearner.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addEnsembleMember(Evaluator<? super InputType,? extends java.lang.Number> member)
Adds a new member to the ensemble.
|
protected AveragingEnsemble<InputType,Evaluator<? super InputType,? extends java.lang.Number>> |
createInitialEnsemble()
Create the initial, empty ensemble for the algorithm to use.
|
cleanupAlgorithm, fillBag, getBag, getDataInBag, getDataList, getEnsemble, getLearner, getPercentToSample, getRandom, getResult, initializeAlgorithm, setBag, setDataInBag, setDataList, setEnsemble, setLearner, setPercentToSample, setRandom, step
clone, getData, getKeepGoing, learn, setData, setKeepGoing, stop
getMaxIterations, isResultValid, setMaxIterations
addIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getIteration, getListeners, removeIterativeAlgorithmListener, setIteration, setListeners
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
learn
clone
getMaxIterations, setMaxIterations
addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListener
isResultValid
public BaggingRegressionLearner()
BaggingRegressionLearner
.public BaggingRegressionLearner(BatchLearner<? super java.util.Collection<? extends InputOutputPair<? extends InputType,java.lang.Double>>,? extends Evaluator<? super InputType,? extends java.lang.Number>> learner)
learner
- The learner to use to create the categorizer on each iteration.public BaggingRegressionLearner(BatchLearner<? super java.util.Collection<? extends InputOutputPair<? extends InputType,java.lang.Double>>,? extends Evaluator<? super InputType,? extends java.lang.Number>> learner, int maxIterations, double percentToSample, java.util.Random random)
learner
- The learner to use to create the regression function on each iteration.maxIterations
- The maximum number of iterations to run for, which is also the
number of learners to create.percentToSample
- The percentage of the total size of the data to sample on each
iteration. Must be positive.random
- The random number generator to use.protected AveragingEnsemble<InputType,Evaluator<? super InputType,? extends java.lang.Number>> createInitialEnsemble()
AbstractBaggingLearner
createInitialEnsemble
in class AbstractBaggingLearner<InputType,java.lang.Double,Evaluator<? super InputType,? extends java.lang.Number>,AveragingEnsemble<InputType,Evaluator<? super InputType,? extends java.lang.Number>>>
protected void addEnsembleMember(Evaluator<? super InputType,? extends java.lang.Number> member)
AbstractBaggingLearner
addEnsembleMember
in class AbstractBaggingLearner<InputType,java.lang.Double,Evaluator<? super InputType,? extends java.lang.Number>,AveragingEnsemble<InputType,Evaluator<? super InputType,? extends java.lang.Number>>>
member
- The new member to add to the ensemble.