Setting threshold for prediction


#1

How do I set an optimal threshold for an XGBoost classifier ? The default value used in the algorithm is 0.5. I wanted to know if there is any feature/in-built function I can use to change this.


#2

The default value used in the algorithm is 0.5

Can you clarify? I thought the prediction function should give you a probability output, so that you can decide the threshold yourself.