".github/vscode:/vscode.git/clone" did not exist on "91536f2d385e52c2c82a996ce124d24a5f25a41e"
Unverified Commit 68621628 authored by Shinichi Hemmi's avatar Shinichi Hemmi Committed by GitHub
Browse files

[python-package] [docs] Update key format of eval_hist in docstring example (#5980)

parent 04b66e06
......@@ -651,13 +651,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__}'.")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment