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
560a0350
Unverified
Commit
560a0350
authored
Nov 07, 2021
by
James Lamb
Committed by
GitHub
Nov 07, 2021
Browse files
[docs] add specific estimator names to sklearn fit() docs (#4774)
parent
cebdc2a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
python-package/lightgbm/sklearn.py
python-package/lightgbm/sklearn.py
+4
-4
No files found.
python-package/lightgbm/sklearn.py
View file @
560a0350
...
@@ -262,7 +262,7 @@ _lgbmmodel_doc_fit = (
...
@@ -262,7 +262,7 @@ _lgbmmodel_doc_fit = (
Returns
Returns
-------
-------
self :
object
self :
LGBMModel
Returns self.
Returns self.
"""
"""
)
)
...
@@ -921,7 +921,7 @@ class LGBMRegressor(_LGBMRegressorBase, LGBMModel):
...
@@ -921,7 +921,7 @@ class LGBMRegressor(_LGBMRegressorBase, LGBMModel):
categorical_feature
=
categorical_feature
,
callbacks
=
callbacks
,
init_model
=
init_model
)
categorical_feature
=
categorical_feature
,
callbacks
=
callbacks
,
init_model
=
init_model
)
return
self
return
self
_base_doc
=
LGBMModel
.
fit
.
__doc__
_base_doc
=
LGBMModel
.
fit
.
__doc__
.
replace
(
"self : LGBMModel"
,
"self : LGBMRegressor"
)
_base_doc
=
(
_base_doc
[:
_base_doc
.
find
(
'group :'
)]
# type: ignore
_base_doc
=
(
_base_doc
[:
_base_doc
.
find
(
'group :'
)]
# type: ignore
+
_base_doc
[
_base_doc
.
find
(
'eval_set :'
):])
# type: ignore
+
_base_doc
[
_base_doc
.
find
(
'eval_set :'
):])
# type: ignore
_base_doc
=
(
_base_doc
[:
_base_doc
.
find
(
'eval_class_weight :'
)]
_base_doc
=
(
_base_doc
[:
_base_doc
.
find
(
'eval_class_weight :'
)]
...
@@ -994,7 +994,7 @@ class LGBMClassifier(_LGBMClassifierBase, LGBMModel):
...
@@ -994,7 +994,7 @@ class LGBMClassifier(_LGBMClassifierBase, LGBMModel):
callbacks
=
callbacks
,
init_model
=
init_model
)
callbacks
=
callbacks
,
init_model
=
init_model
)
return
self
return
self
_base_doc
=
LGBMModel
.
fit
.
__doc__
_base_doc
=
LGBMModel
.
fit
.
__doc__
.
replace
(
"self : LGBMModel"
,
"self : LGBMClassifier"
)
_base_doc
=
(
_base_doc
[:
_base_doc
.
find
(
'group :'
)]
# type: ignore
_base_doc
=
(
_base_doc
[:
_base_doc
.
find
(
'group :'
)]
# type: ignore
+
_base_doc
[
_base_doc
.
find
(
'eval_set :'
):])
# type: ignore
+
_base_doc
[
_base_doc
.
find
(
'eval_set :'
):])
# type: ignore
fit
.
__doc__
=
(
_base_doc
[:
_base_doc
.
find
(
'eval_group :'
)]
fit
.
__doc__
=
(
_base_doc
[:
_base_doc
.
find
(
'eval_group :'
)]
...
@@ -1093,7 +1093,7 @@ class LGBMRanker(LGBMModel):
...
@@ -1093,7 +1093,7 @@ class LGBMRanker(LGBMModel):
categorical_feature
=
categorical_feature
,
callbacks
=
callbacks
,
init_model
=
init_model
)
categorical_feature
=
categorical_feature
,
callbacks
=
callbacks
,
init_model
=
init_model
)
return
self
return
self
_base_doc
=
LGBMModel
.
fit
.
__doc__
_base_doc
=
LGBMModel
.
fit
.
__doc__
.
replace
(
"self : LGBMModel"
,
"self : LGBMRanker"
)
fit
.
__doc__
=
(
_base_doc
[:
_base_doc
.
find
(
'eval_class_weight :'
)]
# type: ignore
fit
.
__doc__
=
(
_base_doc
[:
_base_doc
.
find
(
'eval_class_weight :'
)]
# type: ignore
+
_base_doc
[
_base_doc
.
find
(
'eval_init_score :'
):])
# type: ignore
+
_base_doc
[
_base_doc
.
find
(
'eval_init_score :'
):])
# type: ignore
_base_doc
=
fit
.
__doc__
_base_doc
=
fit
.
__doc__
...
...
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