[R] boosting

From: stephenc <mail_at_xesoftware.com.au>
Date: Thu 25 May 2006 - 14:35:25 EST


Hi  

I am using boosting for a classification and prediction problem.  

For some reason it is giving me an outcome that doesn't fall between 0 and 1 for the predictions. I have tried type="response" but it made no difference.  

Can anyone see what I am doing wrong?  

Screen output shown below:    

> boost.model <- gbm(as.factor(train$simNuance) ~ .,         # formula

+ data=train, # dataset
+ # +1: monotone increase,
+ # 0: no monotone restrictions
+ distribution="gaussian", # bernoulli, adaboost, gaussian,
+ # poisson, and coxph available
+ n.trees=3000, # number of trees
+ shrinkage=0.005, # shrinkage or learning rate,
+ # 0.001 to 0.1 usually work

+ interaction.depth=3, # 1: additive model, 2: two-way
interactions, etc.
+ bag.fraction = 0.5, # subsampling fraction, 0.5 is
probably best
+ train.fraction = 0.5, # fraction of data for training,
+ # first train.fraction*N used
for training
+ n.minobsinnode = 10, # minimum total weight needed in
each node
+ cv.folds = 5, # do 5-fold cross-validation
+ keep.data=TRUE, # keep a copy of the dataset
with the object
+ verbose=FALSE) # print out progress
> > best.iter = gbm.perf(boost.model,method="cv")
> pred = predict.gbm(boost.model, test, best.iter) > summary(pred)

   Min. 1st Qu. Median Mean 3rd Qu. Max.  0.4772 1.5140 1.6760 1.5100 1.7190 1.9420

Checked by AVG Free Edition.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu May 25 14:41:51 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 25 May 2006 - 18:10:32 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.