predict.gbm(..., type='response') does not apply to polynomials or even to any distribution other than bernoulli or poisson.
So, you need to find the most likely class ( apply(.., 1, which.max) on the vector output from the prediction), since desertnaut wrote :
preds = predict(your_model, n.trees, newdata=...,type='response') pred_class <- apply(preds, 1, which.max)
Just write a wrapper that takes type = 'response' and returns this when it's a multinomial model.
smci
source share