Skip to content

Conversation

@trivialfis
Copy link
Member

@trivialfis trivialfis commented Jul 20, 2023

This is the behavior specified by the document but not honored in the actual code. The improvement calculated in early stopping is a bit more complicated than regular monitoring as it has options like min_delta. Leaving it to early stopping to prevent inconsistent behaviors.

  • Don't set the attributes if there's no early stopping.
  • Cleanup 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.

Close #8880 .

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

- Don't set the attributes if there's no early stopping.
- Cleanup the code for callbacks, 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>
@trivialfis
Copy link
Member Author

@hcho3 All changes applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Property best_iteration not reflecting the best iteration when trained without early stopping

2 participants