Skip to content

FIX: passing non default params for default models STLTransform #641

Merged
merged 3 commits into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-

### Fixed
-
- Passing non default params for default models STLTransform ([#641](https://github.com/tinkoff-ai/etna/pull/641))
-
- Fixed bug in models `get_model` method ([#623](https://github.com/tinkoff-ai/etna/pull/623))
- Fixed unsafe comparison in plots ([#611](https://github.com/tinkoff-ai/etna/pull/611))
Expand Down
6 changes: 4 additions & 2 deletions etna/transforms/decomposition/stl.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ def __init__(
if isinstance(model, str):
if model == "arima":
self.model = ARIMA
model_kwargs = {"order": (1, 1, 0)}
if len(model_kwargs) == 0:
model_kwargs = {"order": (1, 1, 0)}
elif model == "holt":
self.model = ETSModel
model_kwargs = {"trend": "add"}
if len(model_kwargs) == 0:
model_kwargs = {"trend": "add"}
else:
raise ValueError(f"Not a valid option for model: {model}")
elif isinstance(model, TimeSeriesModel):
Expand Down