Skip to content

Commit

Permalink
Add **kwargs argument description for models (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemLiA authored Aug 26, 2024
1 parent 1f74446 commit e5cc8d6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased
### Added
-
- Add `**kwargs` argument description for models based on `LinearRegression`, `ElasticNet` and `CatBoostRegressor` ([#454](https://github.com/etna-team/etna/pull/454https://github.com/etna-team/etna/pull/454))
-
-
-
Expand Down
4 changes: 4 additions & 0 deletions etna/models/catboost.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ def __init__(
* For GPU. The given value is used for reading the data from the hard drive and does
not affect the training.
During the training one main thread and one thread for each GPU are used.
**kwargs:
Additional parameters passed to :py:class:`catboost.CatBoostRegressor` model.
"""
self.iterations = iterations
self.depth = depth
Expand Down Expand Up @@ -422,6 +424,8 @@ def __init__(
* For GPU. The given value is used for reading the data from the hard drive and does
not affect the training.
During the training one main thread and one thread for each GPU are used.
**kwargs:
Additional parameters passed to :py:class:`catboost.CatBoostRegressor` model.
"""
self.iterations = iterations
self.depth = depth
Expand Down
8 changes: 8 additions & 0 deletions etna/models/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def __init__(self, fit_intercept: bool = True, **kwargs):
fit_intercept:
Whether to calculate the intercept for this model. If set to False, no intercept will be used in
calculations (i.e. data is expected to be centered).
**kwargs:
Additional parameters passed to :py:class:`sklearn.linear_model.LinearRegression` model.
"""
self.fit_intercept = fit_intercept
self.kwargs = kwargs
Expand Down Expand Up @@ -126,6 +128,8 @@ def __init__(self, alpha: float = 1.0, l1_ratio: float = 0.5, fit_intercept: boo
fit_intercept:
Whether to calculate the intercept for this model. If set to False, no intercept will be used in
calculations (i.e. data is expected to be centered).
**kwargs:
Additional parameters passed to :py:class:`sklearn.linear_model.ElasticNet` model.
"""
self.alpha = alpha
self.l1_ratio = l1_ratio
Expand Down Expand Up @@ -175,6 +179,8 @@ def __init__(self, fit_intercept: bool = True, **kwargs):
fit_intercept:
Whether to calculate the intercept for this model. If set to False, no intercept will be used in
calculations (i.e. data is expected to be centered).
**kwargs:
Additional parameters passed to :py:class:`sklearn.linear_model.LinearRegression` model.
"""
self.fit_intercept = fit_intercept
self.kwargs = kwargs
Expand Down Expand Up @@ -229,6 +235,8 @@ def __init__(self, alpha: float = 1.0, l1_ratio: float = 0.5, fit_intercept: boo
fit_intercept:
Whether to calculate the intercept for this model. If set to False, no intercept will be used in
calculations (i.e. data is expected to be centered).
**kwargs:
Additional parameters passed to :py:class:`sklearn.linear_model.ElasticNet` model.
"""
self.alpha = alpha
self.l1_ratio = l1_ratio
Expand Down

0 comments on commit e5cc8d6

Please sign in to comment.