Skip to content

Add params_to_tune for catboost models #1185

Merged
merged 8 commits into from
Mar 30, 2023
Merged

Add params_to_tune for catboost models #1185

merged 8 commits into from
Mar 30, 2023

Conversation

Mr-Geekman
Copy link
Contributor

@Mr-Geekman Mr-Geekman commented Mar 28, 2023

Before submitting (must do checklist)

  • Did you read the contribution guide?
  • Did you update the docs? We use Numpy format for all the methods and classes.
  • Did you write any new necessary tests?
  • Did you update the CHANGELOG?

Proposed Changes

Look #1184.

Closing issues

Closes #1184.

@Mr-Geekman Mr-Geekman self-assigned this Mar 28, 2023
@Mr-Geekman Mr-Geekman changed the title Add params_to_tune for catboost models Add params_to_tune for catboost models Mar 28, 2023
@github-actions
Copy link

github-actions bot commented Mar 28, 2023

@github-actions github-actions bot temporarily deployed to pull request March 28, 2023 16:42 Inactive
@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2023

Codecov Report

❗ No coverage uploaded for pull request base (automl-2.0@447a032). Click here to learn what that means.
The diff coverage is n/a.

📣 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

@github-actions github-actions bot temporarily deployed to pull request March 28, 2023 17:46 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 28, 2023 19:35 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 29, 2023 08:29 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 29, 2023 09:07 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 29, 2023 10:15 Inactive
@alex-hse-repository alex-hse-repository self-requested a review March 29, 2023 14:47
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))
Copy link
Collaborator

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"

@@ -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.
Copy link
Collaborator

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})
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@github-actions github-actions bot temporarily deployed to pull request March 30, 2023 07:21 Inactive
@Mr-Geekman Mr-Geekman merged commit 0bbca66 into automl-2.0 Mar 30, 2023
@Mr-Geekman Mr-Geekman deleted the issue-1184 branch March 30, 2023 08:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants