Adabag: Bagging classifier

Description Usage Arguments Value Examples

View source: R/Adabag.R

Description

Classify the input with a Bagging classifier. Function uses a vector of number of iterations to search for the best training error. Once the best parameters have been identified, it uses them to predict on the test data.

Usage

1
Adabag(data, mfinal.seq)

Arguments

data

A list generated by the function PrepareData. It is a list with two components. One is a vector of labels, the other is a data frame of features. The other element of the list is a data frame of test features.

mfinal.seq

A vector of values of number of iterations that should be tested.

Value

A list with a dataframe of errors a vector of predictions with the best parameters

Examples

1
2
3
4
path <- "/home/rishabh/mres/ml_comp/data/"
data <- PrepareData(path, mode = 2, sample = TRUE, size = 100)
mfinal.seq <- seq(20, 25, 5)
Adabag(data, mfinal.seq)

rishi1226/classrish documentation built on May 27, 2019, 9:10 a.m.