R gbm – How to Use R gbm with Distribution=”adaboost”?

boostingr

Documentation states that R gbm with distribution = "adaboost" can be used for 0-1 classification problem. Consider the following code fragment:

gbm_algorithm <- gbm(y ~ ., data = train_dataset, distribution = "adaboost", n.trees = 5000)
gbm_predicted <- predict(gbm_algorithm, test_dataset, n.trees = 5000)

It can be found in the documentation that predict.gbm

Returns a vector of predictions. By default the predictions are on the scale of f(x).

However the particular scale is not clear for the case of distribution = "adaboost".

Could anyone help with the interpretation of predict.gbm return values and provide an idea of conversion to the 0-1 output?

Best Answer

The adaboost method gives the predictions on logit scale. You can convert it to the 0-1 output:

gbm_predicted<-plogis(2*gbm_predicted)

note the 2* inside the logis