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
1bd15b94
"python-package/vscode:/vscode.git/clone" did not exist on "4feee28a53b7b04e66ee09103d2aac260404b9cf"
Unverified
Commit
1bd15b94
authored
Jul 07, 2019
by
Guolin Ke
Committed by
GitHub
Jul 07, 2019
Browse files
fix refit decay rate in python (#2254)
parent
bf78008b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+3
-1
No files found.
python-package/lightgbm/basic.py
View file @
1bd15b94
...
@@ -2362,7 +2362,9 @@ class Booster(object):
...
@@ -2362,7 +2362,9 @@ class Booster(object):
leaf_preds
=
predictor
.
predict
(
data
,
-
1
,
pred_leaf
=
True
)
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_params
=
copy
.
deepcopy
(
self
.
params
)
new_params
[
'refit_decay_rate'
]
=
decay_rate
new_booster
=
Booster
(
new_params
,
train_set
,
silent
=
True
)
# Copy models
# Copy models
_safe_call
(
_LIB
.
LGBM_BoosterMerge
(
_safe_call
(
_LIB
.
LGBM_BoosterMerge
(
new_booster
.
handle
,
new_booster
.
handle
,
...
...
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