Skip to content

Fix SARIMAXModel saving init params #81

Merged
merged 3 commits into from
Sep 22, 2021
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Regressors does not have enough history bug ([#35](https://github.com/tinkoff-ai/etna-ts/pull/35))
- make_future(1) and make_future(2) bug
- Fix working with 'cap' and 'floor' features in Prophet model ([#62](https://github.com/tinkoff-ai/etna-ts/pull/62)))
- Fix saving init params for SARIMAXModel ([#81](https://github.com/tinkoff-ai/etna-ts/pull/81))
- Imports of nn models, PytorchForecastingTransform and Transform ([#80](https://github.com/tinkoff-ai/etna-ts/pull/80)))

## [1.0.0] - 2021-09-05
Expand Down
54 changes: 36 additions & 18 deletions etna/models/sarimax.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,25 +402,43 @@ def __init__(
checking is done. If 'drop', any observations with nans are dropped.
If 'raise', an error is raised. Default is 'none'.
"""
self.order = order
self.seasonal_order = seasonal_order
self.trend = trend
self.measurement_error = measurement_error
self.time_varying_regression = time_varying_regression
self.mle_regression = mle_regression
self.simple_differencing = simple_differencing
self.enforce_stationarity = enforce_stationarity
self.enforce_invertibility = enforce_invertibility
self.hamilton_representation = hamilton_representation
self.concentrate_scale = concentrate_scale
self.trend_offset = trend_offset
self.use_exact_diffuse = use_exact_diffuse
self.dates = dates
self.freq = freq
self.missing = missing
self.validate_specification = validate_specification
self.kwargs = kwargs
super(SARIMAXModel, self).__init__(
base_model=_SARIMAXModel(
order=order,
seasonal_order=seasonal_order,
trend=trend,
measurement_error=measurement_error,
time_varying_regression=time_varying_regression,
mle_regression=mle_regression,
simple_differencing=simple_differencing,
enforce_stationarity=enforce_stationarity,
enforce_invertibility=enforce_invertibility,
hamilton_representation=hamilton_representation,
concentrate_scale=concentrate_scale,
trend_offset=trend_offset,
use_exact_diffuse=use_exact_diffuse,
dates=dates,
freq=freq,
missing=missing,
validate_specification=validate_specification,
**kwargs,
order=self.order,
seasonal_order=self.seasonal_order,
trend=self.trend,
measurement_error=self.measurement_error,
time_varying_regression=self.time_varying_regression,
mle_regression=self.mle_regression,
simple_differencing=self.simple_differencing,
enforce_stationarity=self.enforce_stationarity,
enforce_invertibility=self.enforce_invertibility,
hamilton_representation=self.hamilton_representation,
concentrate_scale=self.concentrate_scale,
trend_offset=self.trend_offset,
use_exact_diffuse=self.use_exact_diffuse,
dates=self.dates,
freq=self.freq,
missing=self.missing,
validate_specification=self.validate_specification,
**self.kwargs,
)
)