Description Usage Arguments Value Author(s) References Examples
read adaboost ... a demonstration version
1 |
formula |
formula – the response variable must be coded -1, 1 |
data |
data |
maxiter |
maxiter |
maxdepth |
maxdepth – passed to rpart |
an instance of raboostCont
Vince Carey <stvjc@channing.harvard.edu>
Friedman et al Ann Stat 28/2 337
1 2 3 4 5 6 7 8 9 10 | library(MASS)
data(Pima.tr)
data(Pima.te)
Pima.all = rbind(Pima.tr, Pima.te)
tonp = ifelse(Pima.all$type == "Yes", 1, -1)
tonp = factor(tonp)
Pima.all = data.frame(Pima.all[,1:7], mtype=tonp)
fit1 = RAB(mtype~ped+glu+npreg+bmi+age, data=Pima.all[1:200,], maxiter=10, maxdepth=5)
pfit1 = Predict(fit1, newdata=Pima.tr)
table(Pima.tr$type, pfit1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.