Skip to content

Commit

Permalink
Merge remote-tracking branch 'ligth_gbm/master' into 3313-enable-auto…
Browse files Browse the repository at this point in the history
…-early-stopping
  • Loading branch information
ClaudioSalvatoreArcidiacono committed Sep 9, 2023
2 parents dd8d724 + 6862162 commit ed6a774
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ lightgbm-transform (feature transformation binding): https://github.com/microsof

`postgresml` (LightGBM training and prediction in SQL, via a Postgres extension): https://github.com/postgresml/postgresml

`vaex-ml` (Python DataFrame library with its own interface to LightGBM): https://github.com/vaexio/vaex

Support
-------

Expand Down
13 changes: 9 additions & 4 deletions python-package/lightgbm/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,13 +658,18 @@ def cv(
Returns
-------
eval_hist : dict
Evaluation history.
eval_results : dict
History of evaluation results of each metric.
The dictionary has the following format:
{'metric1-mean': [values], 'metric1-stdv': [values],
'metric2-mean': [values], 'metric2-stdv': [values],
{'valid metric1-mean': [values], 'valid metric1-stdv': [values],
'valid metric2-mean': [values], 'valid metric2-stdv': [values],
...}.
If ``return_cvbooster=True``, also returns trained boosters wrapped in a ``CVBooster`` object via ``cvbooster`` key.
If ``eval_train_metric=True``, also returns the train metric history.
In this case, the dictionary has the following format:
{'train metric1-mean': [values], 'valid metric1-mean': [values],
'train metric2-mean': [values], 'valid metric2-mean': [values],
...}.
"""
if not isinstance(train_set, Dataset):
raise TypeError(f"cv() only accepts Dataset object, train_set has type '{type(train_set).__name__}'.")
Expand Down

0 comments on commit ed6a774

Please sign in to comment.