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
13226fa3
Commit
13226fa3
authored
Dec 31, 2016
by
Guolin Ke
Committed by
GitHub
Dec 31, 2016
Browse files
add callbacks to LGBMRegressor
parent
72c2d790
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
python-package/lightgbm/sklearn.py
python-package/lightgbm/sklearn.py
+3
-2
No files found.
python-package/lightgbm/sklearn.py
View file @
13226fa3
...
@@ -489,7 +489,7 @@ class LGBMRegressor(LGBMModel, LGBMRegressorBase):
...
@@ -489,7 +489,7 @@ class LGBMRegressor(LGBMModel, LGBMRegressorBase):
eval_init_score
=
None
,
eval_init_score
=
None
,
eval_metric
=
"l2"
,
eval_metric
=
"l2"
,
early_stopping_rounds
=
None
,
verbose
=
True
,
early_stopping_rounds
=
None
,
verbose
=
True
,
feature_name
=
None
,
categorical_feature
=
None
):
feature_name
=
None
,
categorical_feature
=
None
,
callbacks
=
None
):
super
(
LGBMRegressor
,
self
).
fit
(
X
,
y
,
sample_weight
=
sample_weight
,
super
(
LGBMRegressor
,
self
).
fit
(
X
,
y
,
sample_weight
=
sample_weight
,
init_score
=
init_score
,
eval_set
=
eval_set
,
init_score
=
init_score
,
eval_set
=
eval_set
,
...
@@ -498,7 +498,8 @@ class LGBMRegressor(LGBMModel, LGBMRegressorBase):
...
@@ -498,7 +498,8 @@ class LGBMRegressor(LGBMModel, LGBMRegressorBase):
eval_metric
=
eval_metric
,
eval_metric
=
eval_metric
,
early_stopping_rounds
=
early_stopping_rounds
,
early_stopping_rounds
=
early_stopping_rounds
,
verbose
=
verbose
,
feature_name
=
feature_name
,
verbose
=
verbose
,
feature_name
=
feature_name
,
categorical_feature
=
categorical_feature
)
categorical_feature
=
categorical_feature
,
callbacks
=
callbacks
)
return
self
return
self
class
LGBMClassifier
(
LGBMModel
,
LGBMClassifierBase
):
class
LGBMClassifier
(
LGBMModel
,
LGBMClassifierBase
):
...
...
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