From e5cc8d68996e8fd22c67c0baa1c404ae81911435 Mon Sep 17 00:00:00 2001 From: Artem Liakhov <103902271+ArtemLiA@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:09:04 +0300 Subject: [PATCH] Add `**kwargs` argument description for models (#454) --- CHANGELOG.md | 2 +- etna/models/catboost.py | 4 ++++ etna/models/linear.py | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94be172a3..ffa9a0e5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) - - - diff --git a/etna/models/catboost.py b/etna/models/catboost.py index 02afc1b52..5ee578cc0 100644 --- a/etna/models/catboost.py +++ b/etna/models/catboost.py @@ -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 @@ -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 diff --git a/etna/models/linear.py b/etna/models/linear.py index 33696a138..57bc6ca89 100644 --- a/etna/models/linear.py +++ b/etna/models/linear.py @@ -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 @@ -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 @@ -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 @@ -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