Jiaming Yuan 851cba931e
Define best_iteration only if early stopping is used. (#9403)
* Define `best_iteration` only if early stopping is used.

This is the behavior specified by the document but not honored in the actual code.

- Don't set the attributes if there's no early stopping.
- Clean up the code for callbacks, and replace assertions with proper exceptions.
- Assign the attributes when early stopping `save_best` is used.
- Turn the attributes into Python properties.

---------

Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
2023-07-24 12:43:35 +08:00
..
2021-10-19 23:49:19 -07:00
2023-07-22 15:26:29 +08:00
2023-03-21 09:22:11 -07:00
2020-11-14 17:58:07 -08:00
2023-07-22 15:26:29 +08:00
2023-04-27 19:29:03 +08:00
2018-07-19 14:22:16 -07:00
2015-08-01 11:27:13 -07:00
2018-02-21 16:57:30 -08:00
2021-10-19 23:49:19 -07:00

The documentation of xgboost is generated with recommonmark and sphinx.

You can build it locally by typing "make html" in this folder.

Checkout https://recommonmark.readthedocs.org for guide on how to write markdown with extensions used in this doc, such as math formulas and table of content.