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]]