View source: R/BaggingWrapper.R
makeBaggingWrapper | R Documentation |
Fuses a learner with the bagging method
(i.e., similar to what a randomForest
does).
Creates a learner object, which can be
used like any other learner object.
Models can easily be accessed via getLearnerModel.
Bagging is implemented as follows: For each iteration a random data subset is sampled (with or without replacement) and potentially the number of features is also restricted to a random subset. Note that this is usually handled in a slightly different way in the random forest where features are sampled at each tree split).
Prediction works as follows: For classification we do majority voting to create a discrete label and probabilities are predicted by considering the proportions of all predicted labels. For regression the mean value and the standard deviations across predictions is computed.
Note that the passed base learner must always have predict.type = 'response'
,
while the BaggingWrapper can estimate probabilities and standard errors, so it can
be set, e.g., to predict.type = 'prob'
. For this reason, when you call
setPredictType, the type is only set for the BaggingWrapper, not passed
down to the inner learner.
makeBaggingWrapper(
learner,
bw.iters = 10L,
bw.replace = TRUE,
bw.size,
bw.feats = 1
)
learner |
(Learner | |
bw.iters |
( |
bw.replace |
( |
bw.size |
( |
bw.feats |
( |
Learner.
Other wrapper:
makeClassificationViaRegressionWrapper()
,
makeConstantClassWrapper()
,
makeCostSensClassifWrapper()
,
makeCostSensRegrWrapper()
,
makeDownsampleWrapper()
,
makeDummyFeaturesWrapper()
,
makeExtractFDAFeatsWrapper()
,
makeFeatSelWrapper()
,
makeFilterWrapper()
,
makeImputeWrapper()
,
makeMulticlassWrapper()
,
makeMultilabelBinaryRelevanceWrapper()
,
makeMultilabelClassifierChainsWrapper()
,
makeMultilabelDBRWrapper()
,
makeMultilabelNestedStackingWrapper()
,
makeMultilabelStackingWrapper()
,
makeOverBaggingWrapper()
,
makePreprocWrapper()
,
makePreprocWrapperCaret()
,
makeRemoveConstantFeaturesWrapper()
,
makeSMOTEWrapper()
,
makeTuneWrapper()
,
makeUndersampleWrapper()
,
makeWeightedClassesWrapper()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.