I am training an xgboost model for binary classification using objective as 'binary:logistic'. The model should predict probability but it is outputting either 0 or 1. I want the model to output the probability. These are the parameters I am using Thanks a lot in advance!
1 Answer
$\begingroup$
$\endgroup$
How are you getting the predictions from your model? It is likely that the default predict
method automatically converts the probability to a 0/1 prediction, and that there's a separate method to get the underlying probability (e.g. see the predict
and predict_proba
methods for the LogisticRegression
in scikit-learn
).
predict
method automatically converts the probability to a 0/1 prediction, and that there's a separate method to get the underlying probability (e.g. see thepredict
andpredict_proba
methods for theLogisticRegression
inscikit-learn
. $\endgroup$