-
Notifications
You must be signed in to change notification settings - Fork 82
Add params_to_tune
for catboost models
#1185
Conversation
params_to_tune
for catboost models
🚀 Deployed on https://deploy-preview-1185--etna-docs.netlify.app |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## automl-2.0 #1185 +/- ##
=============================================
Coverage ? 87.44%
=============================================
Files ? 166
Lines ? 10145
Branches ? 0
=============================================
Hits ? 8871
Misses ? 1274
Partials ? 0 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
# Conflicts: # CHANGELOG.md
CHANGELOG.md
Outdated
@@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
- Decouple `SeasonalMovingAverageModel` from `PerSegmentModelMixin` ([#1132](https://github.com/tinkoff-ai/etna/pull/1132)) | |||
- Decouple `DeadlineMovingAverageModel` from `PerSegmentModelMixin` ([#1140](https://github.com/tinkoff-ai/etna/pull/1140)) | |||
- Remove version python-3.7 from `pyproject.toml`, update lock ([#1183](https://github.com/tinkoff-ai/etna/pull/1183)) | |||
- Add non-empty `params_to_tune` for catboost models ([#1185](https://github.com/tinkoff-ai/etna/pull/1185)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be "non-empty" -> "default"
etna/models/catboost.py
Outdated
@@ -152,6 +159,21 @@ def predict_components(self, df: pd.DataFrame) -> pd.DataFrame: | |||
|
|||
return pd.DataFrame(data=components, columns=component_names) | |||
|
|||
def _params_to_tune(self) -> Dict[str, "BaseDistribution"]: | |||
"""Get hyperparameter grid to tune. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be add "default"
assert len(grid) > 0 | ||
for name, distribution in grid.items(): | ||
value = sampler.sample_independent(study=None, trial=None, param_name=name, param_distribution=distribution) | ||
_ = model.set_params(**{name: value}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does set_params
create a new object with constructor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, set_params
creates new object.
Before submitting (must do checklist)
Proposed Changes
Look #1184.
Closing issues
Closes #1184.