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
2a598c8c
"tests/vscode:/vscode.git/clone" did not exist on "60c92a969a0075cd271d55e40b611aaf52b061ed"
Unverified
Commit
2a598c8c
authored
Jul 03, 2018
by
Nikita Titov
Committed by
GitHub
Jul 03, 2018
Browse files
[docs] clarified feval parameter (#1488)
parent
288f122f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
6 deletions
+25
-6
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+15
-3
python-package/lightgbm/engine.py
python-package/lightgbm/engine.py
+9
-2
python-package/lightgbm/sklearn.py
python-package/lightgbm/sklearn.py
+1
-1
No files found.
python-package/lightgbm/basic.py
View file @
2a598c8c
...
...
@@ -1598,7 +1598,11 @@ class Booster(object):
name : string
Name of the data.
feval : callable or None, optional (default=None)
Custom evaluation function.
Customized evaluation function.
Should accept two parameters: preds, train_data.
For multi-class task, the preds is group by class_id first, then group by row_id.
If you want to get i-th row preds in j-th class, the access way is preds[j * num_data + i].
Note: should return (eval_name, eval_result, is_higher_better) or list of such tuples.
Returns
-------
...
...
@@ -1628,7 +1632,11 @@ class Booster(object):
Parameters
----------
feval : callable or None, optional (default=None)
Custom evaluation function.
Customized evaluation function.
Should accept two parameters: preds, train_data.
For multi-class task, the preds is group by class_id first, then group by row_id.
If you want to get i-th row preds in j-th class, the access way is preds[j * num_data + i].
Note: should return (eval_name, eval_result, is_higher_better) or list of such tuples.
Returns
-------
...
...
@@ -1643,7 +1651,11 @@ class Booster(object):
Parameters
----------
feval : callable or None, optional (default=None)
Custom evaluation function.
Customized evaluation function.
Should accept two parameters: preds, train_data.
For multi-class task, the preds is group by class_id first, then group by row_id.
If you want to get i-th row preds in j-th class, the access way is preds[j * num_data + i].
Note: should return (eval_name, eval_result, is_higher_better) or list of such tuples.
Returns
-------
...
...
python-package/lightgbm/engine.py
View file @
2a598c8c
...
...
@@ -41,6 +41,8 @@ def train(params, train_set, num_boost_round=100,
feval : callable, string or None, optional (default=None)
Customized evaluation function.
Should accept two parameters: preds, train_data.
For multi-class task, the preds is group by class_id first, then group by row_id.
If you want to get i-th row preds in j-th class, the access way is preds[j * num_data + i].
Note: should return (eval_name, eval_result, is_higher_better) or list of such tuples.
To ignore the default metric in params, set it to the string ``"None"``
init_model : string or None, optional (default=None)
...
...
@@ -343,8 +345,13 @@ def cv(params, train_set, num_boost_round=100,
If not None, the metric in ``params`` will be overridden.
fobj : callable or None, optional (default=None)
Custom objective function.
feval : callable or None, optional (default=None)
Custom evaluation function.
feval : callable, string or None, optional (default=None)
Customized evaluation function.
Should accept two parameters: preds, train_data.
For multi-class task, the preds is group by class_id first, then group by row_id.
If you want to get i-th row preds in j-th class, the access way is preds[j * num_data + i].
Note: should return (eval_name, eval_result, is_higher_better) or list of such tuples.
To ignore the default metric in params, set it to the string ``"None"``
init_model : string or None, optional (default=None)
Filename of LightGBM model or Booster instance used for continue training.
feature_name : list of strings or 'auto', optional (default="auto")
...
...
python-package/lightgbm/sklearn.py
View file @
2a598c8c
...
...
@@ -367,7 +367,7 @@ class LGBMModel(_LGBMModelBase):
The weight of samples.
group: array-like
Group/query data, used for ranking task.
eval_name: str
eval_name: str
ing
The name of evaluation.
eval_result: float
The eval result.
...
...
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