How to predict probabilities in xgboost? The below predict function is giving -ve values as well so it cannot be probabilities. 

param &lt;- list(max.depth = 5, eta = 0.01,  objective="binary:logistic",subsample=0.9)
bst &lt;- xgboost(param, data = x_mat, label = y_mat,nround = 3000)

pred_s &lt;- predict(bst, x_mat_s2)


I google &amp; tried pred_s &lt;- predict(bst, x_mat_s2,type="response")
but it didn't work.

Question

How to predict probabilities instead?
Just use predict_proba instead of predict. You can leave the objective as binary:logistic.