Suggested number for parameter early_stopping_rounds


I am using the xgboost package of Python. It has the early_stopping_rounds parameter to avoid overfitting. What will be a suggested number for that early_stopping_rounds, or any suggestions on how to choose an appropriate one based on some kind of criterion?

Thanks in advance!


I think you can choose early_stopping_rounds according to how long you are willing to wait. Choosing a large number for early_stopping_rounds will better capture long-term trend, but then you’ll potentially have to wait longer until training completes.