[R] GBM predict

Jhon Grey butt_its_me at hotmail.com
Thu Oct 1 14:40:42 CEST 2015


I am new to GBM and I am trying to run it on "train.1" dataset(dim(train.1)   39947    43) and checking predictions on "test"(dim(test) 20000 192) using the codes:
gbmFit1 <- train(as.factor(train.1$Labels)~., data = train.1[,-43], method = "gbm", trControl = fitControl,verbose = FALSE)
gbm_dev <- predict(gbmFit1,test,type= "prob")[,2]
However the results of my predictions are having length(gbm_dev) as 3226 !!
What am I doing wrong? 		 	   		  
	[[alternative HTML version deleted]]



More information about the R-help mailing list