Learn R Programming

fdm2id (version 0.9.6)

BAGGING: Classification using Bagging

Description

Ensemble learning, through Bagging Algorithm.

Usage

BAGGING(
  x,
  y,
  learningmethod,
  nsamples = 100,
  bag.size = nrow(x),
  seed = NULL,
  ...
)

Value

The classification model.

Arguments

x

The dataset (description/predictors), a matrix or data.frame.

y

The target (class labels or numeric values), a factor or vector.

learningmethod

The boosted method.

nsamples

The number of samplings.

bag.size

The size of the samples.

seed

A specified seed for random number generation.

...

Other specific parameters for the leaning method.

See Also

ADABOOST, predict.boosting

Examples

Run this code
if (FALSE) {
require (datasets)
data (iris)
BAGGING (iris [, -5], iris [, 5], NB)
}

Run the code above in your browser using DataLab