The below predict function is giving -ve values as well so it cannot be probabilities.
param <- list(max.depth = 5, eta = 0.01, objective="binary:logistic",subsample=0.9)
bst <- xgboost(param, data = x_mat, label = y_mat,nround = 3000)
pred_s <- predict(bst, x_mat_s2)
I google & tried pred_s <- predict(bst, x_mat_s2,type="response")
but it didn't work.
Question
How to predict probabilities instead?
outputmargin=F
to thepredict
function? If somehow theoutputmargin
is set toT
, it will return the value before the logistic transformation. $\endgroup$predict_proba
implementation fromsklearn
API: github.com/dmlc/xgboost/blob/master/python-package/xgboost/… $\endgroup$