6
$\begingroup$

When using the python / sklearn API of xgboost are the probabilities obtained via the predict_proba method "real probabilities" or do I have to use logit:rawand manually calculate the sigmoid function?

I wanted to experiment with different cutoff points. Currently using binary:lgisticvia the sklearn:XGBClassifier the probabilities returned from the prob_a method rather resemble 2 classes and not a continuous function where changing the cut-off point impacts the final scoring.

Is this the right way to obtain probabilities for experimenting with the cutoff value?

enter image description here

$\endgroup$
1
  • $\begingroup$ Same question, I want to figure out if the predict_proba works too. Do you know? $\endgroup$ Jan 13, 2017 at 20:49

2 Answers 2

3
$\begingroup$

Curious Georg if you ran across this article in your pursuit of trying to generate probabilities. It is worth noting that binary:logistic and multi:softprob return predicted probability of each data point belonging to each class.

You can look here to see how the following code is used: XGBoost Predict_Proba Code

$\endgroup$
1
0
$\begingroup$

LightGBM forum was the answer ;) https://github.com/Microsoft/LightGBM/issues/272#issuecomment-276168493

  • apparently, my model is fitting the result very good, i.e. it is very sure about the class probabilities
  • I did not expect such clear-cut boundaries and thus was confused if this could be correct.
$\endgroup$
1
  • $\begingroup$ Can you please summarize the main points from that article? If the link stops working, this answer will become useless. Also, we don't want to be just a link farm pointing to other places. (See also datascience.stackexchange.com/help/deleted-answers.) Thanks! $\endgroup$
    – D.W.
    Jan 30, 2017 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.