Skip to content

Commit 6e12572

Browse files
authored
rename StatsForecast* models (#2762)
* rename StatsForecast* models * update changelog * update examples
1 parent 08bcfb4 commit 6e12572

File tree

16 files changed

+103
-97
lines changed

16 files changed

+103
-97
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ but cannot always guarantee backwards compatibility. Changes that may **break co
1212
**Improved**
1313

1414
- Added support for categorical covariate to `CatBoostModel`. You can now define categorical components at model construction with parameters `categorical_*_covariates: List[str]` for past, future, and static covariates. [#2733](https://github.com/unit8co/darts/pull/2750) by [Jonas Blanc](https://github.com/jonasblanc).
15-
- Added new forecasting model: `StatsForecastAutoMFLES`, a simple time series method based on gradient boosting time series decomposition as proposed in [this repository](https://github.com/tblume1992/MFLES). This implementation is based on [AutoMFLES](https://nixtlaverse.nixtla.io/statsforecast/docs/models/mfles.html) from Nixtla's `statsforecasts` library. [#2747](https://github.com/unit8co/darts/pull/2747) by [Che Hang Ng](https://github.com/CheHangNg).
15+
- Added new forecasting model: `AutoMFLES`, a simple time series method based on gradient boosting time series decomposition as proposed in [this repository](https://github.com/tblume1992/MFLES). This implementation is based on [AutoMFLES](https://nixtlaverse.nixtla.io/statsforecast/docs/models/mfles.html) from Nixtla's `statsforecasts` library. [#2747](https://github.com/unit8co/darts/pull/2747) by [Che Hang Ng](https://github.com/CheHangNg).
16+
- 🔴 Simplified all `StatsForecast*` model names by removing the `StatsForecast` part. [#2762](https://github.com/unit8co/darts/pull/2762) by [Dennis Bader](https://github.com/dennisbader).
17+
- Renamed `StatsForecastAutoARIMA` to `AutoARIMA`
18+
- Renamed `StatsForecastAutoCES` to `AutoCES`
19+
- Renamed `StatsForecastAutoETS` to `AutoETS`
20+
- Renamed `StatsForecastAutoTBATS` to `AutoTBATS`
21+
- Renamed `StatsForecastAutoTheta` to `AutoTheta`
1622

1723
**Removed / moved**
1824

README.md

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

darts/models/__init__.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -90,27 +90,27 @@
9090

9191
try:
9292
from darts.models.forecasting.croston import Croston
93-
from darts.models.forecasting.sf_auto_arima import StatsForecastAutoARIMA
94-
from darts.models.forecasting.sf_auto_ces import StatsForecastAutoCES
95-
from darts.models.forecasting.sf_auto_ets import StatsForecastAutoETS
96-
from darts.models.forecasting.sf_auto_mfles import StatsForecastAutoMFLES
97-
from darts.models.forecasting.sf_auto_tbats import StatsForecastAutoTBATS
98-
from darts.models.forecasting.sf_auto_theta import StatsForecastAutoTheta
93+
from darts.models.forecasting.sf_auto_arima import AutoARIMA
94+
from darts.models.forecasting.sf_auto_ces import AutoCES
95+
from darts.models.forecasting.sf_auto_ets import AutoETS
96+
from darts.models.forecasting.sf_auto_mfles import AutoMFLES
97+
from darts.models.forecasting.sf_auto_tbats import AutoTBATS
98+
from darts.models.forecasting.sf_auto_theta import AutoTheta
9999

100100
except ImportError:
101101
logger.warning(
102102
"The StatsForecast module could not be imported. "
103-
"To enable support for the StatsForecastAutoARIMA, "
104-
"StatsForecastAutoETS and Croston models, please consider "
103+
"To enable support for the AutoARIMA, "
104+
"AutoETS and Croston models, please consider "
105105
"installing it."
106106
)
107107
Croston = NotImportedModule(module_name="StatsForecast", warn=False)
108-
StatsForecastAutoARIMA = NotImportedModule(module_name="StatsForecast", warn=False)
109-
StatsForecastAutoCES = NotImportedModule(module_name="StatsForecast", warn=False)
110-
StatsForecastAutoETS = NotImportedModule(module_name="StatsForecast", warn=False)
111-
StatsForecastAutoMFLES = NotImportedModule(module_name="StatsForecast", warn=False)
112-
StatsForecastAutoTheta = NotImportedModule(module_name="StatsForecast", warn=False)
113-
StatsForecastAutoTBATS = NotImportedModule(module_name="StatsForecast", warn=False)
108+
AutoARIMA = NotImportedModule(module_name="StatsForecast", warn=False)
109+
AutoCES = NotImportedModule(module_name="StatsForecast", warn=False)
110+
AutoETS = NotImportedModule(module_name="StatsForecast", warn=False)
111+
AutoMFLES = NotImportedModule(module_name="StatsForecast", warn=False)
112+
AutoTheta = NotImportedModule(module_name="StatsForecast", warn=False)
113+
AutoTBATS = NotImportedModule(module_name="StatsForecast", warn=False)
114114

115115
try:
116116
from darts.models.forecasting.xgboost import XGBModel
@@ -158,12 +158,12 @@
158158
"Prophet",
159159
"CatBoostModel",
160160
"Croston",
161-
"StatsForecastAutoARIMA",
162-
"StatsForecastAutoCES",
163-
"StatsForecastAutoETS",
164-
"StatsForecastAutoMFLES",
165-
"StatsForecastAutoTheta",
166-
"StatsForecastAutoTBATS",
161+
"AutoARIMA",
162+
"AutoCES",
163+
"AutoETS",
164+
"AutoMFLES",
165+
"AutoTheta",
166+
"AutoTBATS",
167167
"XGBModel",
168168
"GaussianProcessFilter",
169169
"KalmanFilter",

darts/models/forecasting/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
Statistical Models (`LocalForecastingModel <https://unit8co.github.io/darts/userguide/covariates.html#local-forecasting-models-lfms>`_)
1515
- :class:`~darts.models.forecasting.arima.ARIMA`
1616
- :class:`~darts.models.forecasting.varima.VARIMA`
17-
- :class:`~darts.models.forecasting.sf_auto_arima.StatsForecastAutoARIMA`
17+
- :class:`~darts.models.forecasting.sf_auto_arima.AutoARIMA`
1818
- :class:`~darts.models.forecasting.exponential_smoothing.ExponentialSmoothing`
19-
- :class:`~darts.models.forecasting.sf_auto_ets.StatsForecastAutoETS`
20-
- :class:`~darts.models.forecasting.sf_auto_ces.StatsForecastAutoCES`
21-
- :class:`~darts.models.forecasting.sf_auto_mfles.StatsForecastAutoMFLES`
19+
- :class:`~darts.models.forecasting.sf_auto_ets.AutoETS`
20+
- :class:`~darts.models.forecasting.sf_auto_ces.AutoCES`
21+
- :class:`~darts.models.forecasting.sf_auto_mfles.AutoMFLES`
2222
- :class:`~darts.models.forecasting.tbats_model.BATS`
2323
- :class:`~darts.models.forecasting.tbats_model.TBATS`
24-
- :class:`~darts.models.forecasting.sf_auto_tbats.StatsForecastAutoTBATS`
24+
- :class:`~darts.models.forecasting.sf_auto_tbats.AutoTBATS`
2525
- :class:`~darts.models.forecasting.theta.Theta`
2626
- :class:`~darts.models.forecasting.theta.FourTheta`
27-
- :class:`~darts.models.forecasting.sf_auto_theta.StatsForecastAutoTheta`
27+
- :class:`~darts.models.forecasting.sf_auto_theta.AutoTheta`
2828
- :class:`~darts.models.forecasting.prophet_model.Prophet`
2929
- :class:`~Fast Fourier Transform) <darts.models.forecasting.fft.FFT`
3030
- :class:`~darts.models.forecasting.kalman_forecaster.KalmanForecaster`

darts/models/forecasting/sf_auto_arima.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
StatsForecastAutoARIMA
2+
AutoARIMA
33
-----------
44
"""
55

@@ -18,7 +18,7 @@
1818
)
1919

2020

21-
class StatsForecastAutoARIMA(FutureCovariatesLocalForecastingModel):
21+
class AutoARIMA(FutureCovariatesLocalForecastingModel):
2222
def __init__(
2323
self, *autoarima_args, add_encoders: Optional[dict] = None, **autoarima_kwargs
2424
):
@@ -69,13 +69,13 @@ def encode_year(idx):
6969
Examples
7070
--------
7171
>>> from darts.datasets import AirPassengersDataset
72-
>>> from darts.models import StatsForecastAutoARIMA
72+
>>> from darts.models import AutoARIMA
7373
>>> from darts.utils.timeseries_generation import datetime_attribute_timeseries
7474
>>> series = AirPassengersDataset().load()
7575
>>> # optionally, use some future covariates; e.g. the value of the month encoded as a sine and cosine series
7676
>>> future_cov = datetime_attribute_timeseries(series, "month", cyclic=True, add_length=6)
77-
>>> # define StatsForecastAutoARIMA parameters
78-
>>> model = StatsForecastAutoARIMA(season_length=12)
77+
>>> # define AutoARIMA parameters
78+
>>> model = AutoARIMA(season_length=12)
7979
>>> model.fit(series, future_covariates=future_cov)
8080
>>> pred = model.predict(6, future_covariates=future_cov)
8181
>>> pred.values()

darts/models/forecasting/sf_auto_ces.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
StatsForecastAutoCES
2+
AutoCES
33
-----------
44
"""
55

@@ -9,7 +9,7 @@
99
from darts.models.forecasting.forecasting_model import LocalForecastingModel
1010

1111

12-
class StatsForecastAutoCES(LocalForecastingModel):
12+
class AutoCES(LocalForecastingModel):
1313
def __init__(self, *autoces_args, **autoces_kwargs):
1414
"""Auto-CES based on `Statsforecasts package
1515
<https://github.com/Nixtla/statsforecast>`_.
@@ -31,10 +31,10 @@ def __init__(self, *autoces_args, **autoces_kwargs):
3131
Examples
3232
--------
3333
>>> from darts.datasets import AirPassengersDataset
34-
>>> from darts.models import StatsForecastAutoCES
34+
>>> from darts.models import AutoCES
3535
>>> series = AirPassengersDataset().load()
36-
>>> # define StatsForecastAutoCES parameters
37-
>>> model = StatsForecastAutoCES(season_length=12, model="Z")
36+
>>> # define AutoCES parameters
37+
>>> model = AutoCES(season_length=12, model="Z")
3838
>>> model.fit(series)
3939
>>> pred = model.predict(6)
4040
>>> pred.values()

darts/models/forecasting/sf_auto_ets.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
StatsForecastAutoETS
2+
AutoETS
33
-----------
44
"""
55

@@ -19,7 +19,7 @@
1919
)
2020

2121

22-
class StatsForecastAutoETS(FutureCovariatesLocalForecastingModel):
22+
class AutoETS(FutureCovariatesLocalForecastingModel):
2323
def __init__(
2424
self, *autoets_args, add_encoders: Optional[dict] = None, **autoets_kwargs
2525
):
@@ -74,13 +74,13 @@ def encode_year(idx):
7474
Examples
7575
--------
7676
>>> from darts.datasets import AirPassengersDataset
77-
>>> from darts.models import StatsForecastAutoETS
77+
>>> from darts.models import AutoETS
7878
>>> from darts.utils.timeseries_generation import datetime_attribute_timeseries
7979
>>> series = AirPassengersDataset().load()
8080
>>> # optionally, use some future covariates; e.g. the value of the month encoded as a sine and cosine series
8181
>>> future_cov = datetime_attribute_timeseries(series, "month", cyclic=True, add_length=6)
82-
>>> # define StatsForecastAutoETS parameters
83-
>>> model = StatsForecastAutoETS(season_length=12, model="AZZ")
82+
>>> # define AutoETS parameters
83+
>>> model = AutoETS(season_length=12, model="AZZ")
8484
>>> model.fit(series, future_covariates=future_cov)
8585
>>> pred = model.predict(6, future_covariates=future_cov)
8686
>>> pred.values()

darts/models/forecasting/sf_auto_mfles.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
StatsForecastAutoMFLES
2+
AutoMFLES
33
-----------
44
"""
55

@@ -16,7 +16,7 @@
1616
logger = get_logger(__name__)
1717

1818

19-
class StatsForecastAutoMFLES(FutureCovariatesLocalForecastingModel):
19+
class AutoMFLES(FutureCovariatesLocalForecastingModel):
2020
def __init__(
2121
self, *autoMFLES_args, add_encoders: Optional[dict] = None, **autoMFLES_kwargs
2222
):
@@ -64,13 +64,13 @@ def encode_year(idx):
6464
Examples
6565
--------
6666
>>> from darts.datasets import AirPassengersDataset
67-
>>> from darts.models import StatsForecastAutoMFLES
67+
>>> from darts.models import AutoMFLES
6868
>>> from darts.utils.timeseries_generation import datetime_attribute_timeseries
6969
>>> series = AirPassengersDataset().load()
7070
>>> # optionally, use some future covariates; e.g. the value of the month encoded as a sine and cosine series
7171
>>> future_cov = datetime_attribute_timeseries(series, "month", cyclic=True, add_length=6)
72-
>>> # define StatsForecastAutoMFLES parameters
73-
>>> model = StatsForecastAutoMFLES(season_length=12, test_size=12)
72+
>>> # define AutoMFLES parameters
73+
>>> model = AutoMFLES(season_length=12, test_size=12)
7474
>>> model.fit(series, future_covariates=future_cov)
7575
>>> pred = model.predict(6, future_covariates=future_cov)
7676
>>> pred.values()
@@ -83,7 +83,7 @@ def encode_year(idx):
8383
"""
8484
if "prediction_intervals" in autoMFLES_kwargs:
8585
logger.warning(
86-
"StatsForecastAutoMFLES does not support probabilistic forecasting. "
86+
"AutoMFLES does not support probabilistic forecasting. "
8787
"`prediction_intervals` will be ignored."
8888
)
8989

darts/models/forecasting/sf_auto_tbats.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
StatsForecastAutoTBATS
2+
AutoTBATS
33
-----------
44
"""
55

@@ -14,7 +14,7 @@
1414
from darts.models.forecasting.forecasting_model import LocalForecastingModel
1515

1616

17-
class StatsForecastAutoTBATS(LocalForecastingModel):
17+
class AutoTBATS(LocalForecastingModel):
1818
def __init__(self, *autoTBATS_args, **autoTBATS_kwargs):
1919
"""Auto-TBATS based on `Statsforecasts package
2020
<https://github.com/Nixtla/statsforecast>`_.
@@ -40,10 +40,10 @@ def __init__(self, *autoTBATS_args, **autoTBATS_kwargs):
4040
Examples
4141
--------
4242
>>> from darts.datasets import AirPassengersDataset
43-
>>> from darts.models import StatsForecastAutoTBATS
43+
>>> from darts.models import AutoTBATS
4444
>>> series = AirPassengersDataset().load()
45-
>>> # define StatsForecastAutoTBATS parameters
46-
>>> model = StatsForecastAutoTBATS(season_length=12)
45+
>>> # define AutoTBATS parameters
46+
>>> model = AutoTBATS(season_length=12)
4747
>>> model.fit(series)
4848
>>> pred = model.predict(6)
4949
>>> pred.values()

darts/models/forecasting/sf_auto_theta.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
StatsForecastAutoTheta
2+
AutoTheta
33
-----------
44
"""
55

@@ -14,7 +14,7 @@
1414
from darts.models.forecasting.forecasting_model import LocalForecastingModel
1515

1616

17-
class StatsForecastAutoTheta(LocalForecastingModel):
17+
class AutoTheta(LocalForecastingModel):
1818
def __init__(self, *autotheta_args, **autotheta_kwargs):
1919
"""Auto-Theta based on `Statsforecasts package
2020
<https://github.com/Nixtla/statsforecast>`_.
@@ -39,10 +39,10 @@ def __init__(self, *autotheta_args, **autotheta_kwargs):
3939
Examples
4040
--------
4141
>>> from darts.datasets import AirPassengersDataset
42-
>>> from darts.models import StatsForecastAutoTheta
42+
>>> from darts.models import AutoTheta
4343
>>> series = AirPassengersDataset().load()
44-
>>> # define StatsForecastAutoTheta parameters
45-
>>> model = StatsForecastAutoTheta(season_length=12)
44+
>>> # define AutoTheta parameters
45+
>>> model = AutoTheta(season_length=12)
4646
>>> model.fit(series)
4747
>>> pred = model.predict(6)
4848
>>> pred.values()

0 commit comments

Comments
 (0)