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
1d075f4d
Unverified
Commit
1d075f4d
authored
Sep 08, 2018
by
Nikita Titov
Committed by
GitHub
Sep 08, 2018
Browse files
[python] pass params to predictor in refit (#1650)
* pass params to predictor * hotfix
parent
a7d2b174
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+2
-2
No files found.
python-package/lightgbm/basic.py
View file @
1d075f4d
...
@@ -2123,8 +2123,8 @@ class Booster(object):
...
@@ -2123,8 +2123,8 @@ class Booster(object):
result : Booster
result : Booster
Refitted Booster.
Refitted Booster.
"""
"""
predictor
=
self
.
_to_predictor
()
predictor
=
self
.
_to_predictor
(
kwargs
)
leaf_preds
=
predictor
.
predict
(
data
,
-
1
,
pred_leaf
=
True
,
**
kwargs
)
leaf_preds
=
predictor
.
predict
(
data
,
-
1
,
pred_leaf
=
True
)
nrow
,
ncol
=
leaf_preds
.
shape
nrow
,
ncol
=
leaf_preds
.
shape
train_set
=
Dataset
(
data
,
label
,
silent
=
True
)
train_set
=
Dataset
(
data
,
label
,
silent
=
True
)
new_booster
=
Booster
(
self
.
params
,
train_set
,
silent
=
True
)
new_booster
=
Booster
(
self
.
params
,
train_set
,
silent
=
True
)
...
...
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