Skip to content

Commit

Permalink
make new early stopping parameters keyword-only
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaudioSalvatoreArcidiacono committed Dec 18, 2024
1 parent a61726f commit 44316d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions python-package/lightgbm/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,10 +1134,11 @@ def __init__(
random_state: Optional[Union[int, np.random.RandomState, "np.random.Generator"]] = None,
n_jobs: Optional[int] = None,
importance_type: str = "split",
client: Optional[Client] = None,
*,
early_stopping: bool = False,
n_iter_no_change: int = 10,
validation_fraction: Optional[float] = 0.1,
client: Optional[Client] = None,
**kwargs: Any,
):
"""Docstring is inherited from the lightgbm.LGBMClassifier.__init__."""
Expand Down Expand Up @@ -1340,10 +1341,11 @@ def __init__(
random_state: Optional[Union[int, np.random.RandomState, "np.random.Generator"]] = None,
n_jobs: Optional[int] = None,
importance_type: str = "split",
client: Optional[Client] = None,
*,
early_stopping: bool = False,
n_iter_no_change: int = 10,
validation_fraction: Optional[float] = 0.1,
client: Optional[Client] = None,
**kwargs: Any,
):
"""Docstring is inherited from the lightgbm.LGBMRegressor.__init__."""
Expand Down Expand Up @@ -1510,10 +1512,11 @@ def __init__(
random_state: Optional[Union[int, np.random.RandomState, "np.random.Generator"]] = None,
n_jobs: Optional[int] = None,
importance_type: str = "split",
client: Optional[Client] = None,
*,
early_stopping: bool = False,
n_iter_no_change: int = 10,
validation_fraction: Optional[float] = 0.1,
client: Optional[Client] = None,
**kwargs: Any,
):
"""Docstring is inherited from the lightgbm.LGBMRanker.__init__."""
Expand Down
3 changes: 2 additions & 1 deletion python-package/lightgbm/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,11 @@ def __init__(
random_state: Optional[Union[int, np.random.RandomState, np.random.Generator]] = None,
n_jobs: Optional[int] = None,
importance_type: str = "split",
*,
early_stopping: bool = False,
n_iter_no_change: int = 10,
validation_fraction: Optional[float] = 0.1,
**kwargs,
**kwargs: Any,
):
r"""Construct a gradient boosting model.
Expand Down

0 comments on commit 44316d7

Please sign in to comment.