[R] Boosting Algorithm for Regression (Adaboost.R2)

Majid Javanmard javanmard.majid at gmail.com
Wed Mar 30 23:13:21 CEST 2016


Hello

I am new to R , Is there any code to run Adaboost.R2 in r ?!
I wrote a code from example of gbm package, but I can not have prediction
interval would you help me ?!


library(gbm)
mm <- read.table("E:/bagg.txt",TRUE)
xnam <- paste("x", 1:50, sep="")
fmla <- as.formula(paste("y ~ ", paste(xnam, collapse= "+")))
gbm1 <- gbm(fmla, data=mm, n.trees=100, distribution="gaussian",
interaction.depth=3, bag.fraction=0.5, train.fraction=1.0, shrinkage=0.1,
keep.data=TRUE)
pred <- predict(gbm1,n.trees=100)
pred <- as.data.frame(pred)


Thanks

	[[alternative HTML version deleted]]



More information about the R-help mailing list