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
717631af
Unverified
Commit
717631af
authored
Feb 17, 2022
by
James Lamb
Committed by
GitHub
Feb 17, 2022
Browse files
[docs] clarify that custom eval functions are not only used on training data (#5011)
parent
83a41dab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+1
-1
python-package/lightgbm/engine.py
python-package/lightgbm/engine.py
+4
-4
No files found.
python-package/lightgbm/basic.py
View file @
717631af
...
@@ -3152,7 +3152,7 @@ class Booster:
...
@@ -3152,7 +3152,7 @@ class Booster:
If ``fobj`` is specified, predicted values are returned before any transformation,
If ``fobj`` is specified, predicted values are returned before any transformation,
e.g. they are raw margin instead of probability of positive class for binary task in this case.
e.g. they are raw margin instead of probability of positive class for binary task in this case.
eval_data : Dataset
eval_data : Dataset
The evaluation dataset
.
A ``Dataset`` to evaluate
.
eval_name : str
eval_name : str
The name of evaluation function (without whitespace).
The name of evaluation function (without whitespace).
eval_result : float
eval_result : float
...
...
python-package/lightgbm/engine.py
View file @
717631af
...
@@ -83,7 +83,7 @@ def train(
...
@@ -83,7 +83,7 @@ def train(
If ``fobj`` is specified, predicted values are returned before any transformation,
If ``fobj`` is specified, predicted values are returned before any transformation,
e.g. they are raw margin instead of probability of positive class for binary task in this case.
e.g. they are raw margin instead of probability of positive class for binary task in this case.
eval_data : Dataset
eval_data : Dataset
The training dataset
.
A ``Dataset`` to evaluate
.
eval_name : str
eval_name : str
The name of evaluation function (without whitespaces).
The name of evaluation function (without whitespaces).
eval_result : float
eval_result : float
...
@@ -430,15 +430,15 @@ def cv(params, train_set, num_boost_round=100,
...
@@ -430,15 +430,15 @@ def cv(params, train_set, num_boost_round=100,
feval : callable, list of callable, or None, optional (default=None)
feval : callable, list of callable, or None, optional (default=None)
Customized evaluation function.
Customized evaluation function.
Each evaluation function should accept two parameters: preds,
train
_data,
Each evaluation function should accept two parameters: preds,
eval
_data,
and return (eval_name, eval_result, is_higher_better) or list of such tuples.
and return (eval_name, eval_result, is_higher_better) or list of such tuples.
preds : numpy 1-D array
preds : numpy 1-D array
The predicted values.
The predicted values.
If ``fobj`` is specified, predicted values are returned before any transformation,
If ``fobj`` is specified, predicted values are returned before any transformation,
e.g. they are raw margin instead of probability of positive class for binary task in this case.
e.g. they are raw margin instead of probability of positive class for binary task in this case.
train
_data : Dataset
eval
_data : Dataset
The training dataset
.
A ``Dataset`` to evaluate
.
eval_name : str
eval_name : str
The name of evaluation function (without whitespace).
The name of evaluation function (without whitespace).
eval_result : float
eval_result : float
...
...
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