Skip to content

Commit

Permalink
[docs][python] Improve description of eval_result argument in `reco…
Browse files Browse the repository at this point in the history
…rd_evaluation()` (#4559)

* Update callback.py

* Update engine.py
  • Loading branch information
StrikerRUS authored Aug 27, 2021
1 parent 8a07ed2 commit 2067bdc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions python-package/lightgbm/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ def record_evaluation(eval_result: Dict[str, Dict[str, List[Any]]]) -> Callable:
Parameters
----------
eval_result : dict
A dictionary to store the evaluation results.
Dictionary used to store all evaluation results of all validation sets.
This should be initialized outside of your call to ``record_evaluation()`` and should be empty.
Any initial contents of the dictionary will be deleted.
Returns
-------
Expand Down Expand Up @@ -157,9 +159,9 @@ def early_stopping(stopping_rounds: int, first_metric_only: bool = False, verbos
Parameters
----------
stopping_rounds : int
The possible number of rounds without the trend occurrence.
The possible number of rounds without the trend occurrence.
first_metric_only : bool, optional (default=False)
Whether to use only the first metric for early stopping.
Whether to use only the first metric for early stopping.
verbose : bool, optional (default=True)
Whether to print message with early stopping information.
Expand Down
2 changes: 1 addition & 1 deletion python-package/lightgbm/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def train(
evals_result: dict or None, optional (default=None)
Dictionary used to store all evaluation results of all the items in ``valid_sets``.
This should be initialized outside of your call to ``train()`` and should be empty.
Any initial contents of the dictionary will be deleted by ``train()``.
Any initial contents of the dictionary will be deleted.
.. rubric:: Example
Expand Down

0 comments on commit 2067bdc

Please sign in to comment.