adaBoost: Adaboost algorithm

Description Usage Arguments Details Value Author(s) Examples

View source: R/adaBoost.R

Description

Do classification using adaboost algorithm with decisionStump as weak learner

Usage

1
adaBoost(train = decisionStump, dat.train, y.train, B = 10, ...)

Arguments

train

Function of weak learner that would be used in adaboost, must have form train(dat.train,w,y.train)

dat.train

Training data set

y.train

Label for training data set

B

Number of weak learners that will used

...

Other parameters that need to passed in train function

Details

Train function can be any weak learner algorithm. For now, train function must has form train(X,w,y,...). see more in decisionStump

If you have any good weak learner but can't use it in this function, feel free to let me know.

Value

alpha

The weight for different weak learners

allPars

A list of parameters for different weak learners

Author(s)

Xiaoyao Yang

Examples

1
2
3
4
5
6
set.seed(1024)
z <- runif(n=5)
mydata <- fakedata(w=z,n=100)
X<- mydata$S[,1:4]
y <- mydata$y
res <- adaBoost(dat.train=X,y.train=y,B=3)

freestats documentation built on May 30, 2017, 4:27 a.m.