|
Medial Code Documentation
|
Public Member Functions | |
| None | __init__ (self, Union[Callable[[int], float], Sequence[float]] learning_rates) |
| bool | after_iteration (self, _Model model, int epoch, TrainingCallback.EvalsLog evals_log) |
Public Member Functions inherited from xgboost.callback.TrainingCallback | |
| _Model | before_training (self, _Model model) |
| _Model | after_training (self, _Model model) |
| bool | before_iteration (self, _Model model, int epoch, EvalsLog evals_log) |
Data Fields | |
| learning_rates | |
Additional Inherited Members | |
Static Public Attributes inherited from xgboost.callback.TrainingCallback | |
| EvalsLog = Dict[str, Dict[str, _ScoreList]] | |
Callback function for scheduling learning rate.
.. versionadded:: 1.3.0
Parameters
----------
learning_rates :
If it's a callable object, then it should accept an integer parameter
`epoch` and returns the corresponding learning rate. Otherwise it
should be a sequence like list or tuple with the same size of boosting
rounds. | None xgboost.callback.LearningRateScheduler.__init__ | ( | self, | |
| Union[Callable[[int], float], Sequence[float]] | learning_rates | ||
| ) |
Reimplemented from xgboost.callback.TrainingCallback.
| bool xgboost.callback.LearningRateScheduler.after_iteration | ( | self, | |
| _Model | model, | ||
| int | epoch, | ||
| TrainingCallback.EvalsLog | evals_log | ||
| ) |
Run after each iteration. Return True when training should stop.
Reimplemented from xgboost.callback.TrainingCallback.