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
01c7b97d
Commit
01c7b97d
authored
Jun 21, 2017
by
Tsukasa OMOTO
Committed by
Guolin Ke
Jun 21, 2017
Browse files
python-package: fix eval_at (#639)
eval_at has been broken after
e465f92a
. This commit will fix eval_at.
parent
31302bf7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
python-package/lightgbm/sklearn.py
python-package/lightgbm/sklearn.py
+2
-0
No files found.
python-package/lightgbm/sklearn.py
View file @
01c7b97d
...
...
@@ -340,6 +340,8 @@ class LGBMModel(LGBMModelBase):
params
.
pop
(
'n_estimators'
,
None
)
if
hasattr
(
self
,
'n_classes_'
)
and
self
.
n_classes_
>
2
:
params
[
'num_class'
]
=
self
.
n_classes_
if
hasattr
(
self
,
'eval_at'
):
params
[
'ndcg_eval_at'
]
=
self
.
eval_at
if
self
.
fobj
:
params
[
'objective'
]
=
'None'
# objective = nullptr for unknown objective
...
...
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