Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
68621628
".github/vscode:/vscode.git/clone" did not exist on "91536f2d385e52c2c82a996ce124d24a5f25a41e"
Unverified
Commit
68621628
authored
Sep 09, 2023
by
Shinichi Hemmi
Committed by
GitHub
Sep 08, 2023
Browse files
[python-package] [docs] Update key format of eval_hist in docstring example (#5980)
parent
04b66e06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
python-package/lightgbm/engine.py
python-package/lightgbm/engine.py
+9
-4
No files found.
python-package/lightgbm/engine.py
View file @
68621628
...
...
@@ -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__
}
'."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment