BaseStatsForecaster¶
yohou_nixtla.stats.BaseStatsForecaster
¶
Bases: BaseNixtlaForecaster
Base class for statsforecast model wrappers in yohou.
Wraps a statsforecast model class using the BaseNixtlaForecaster
pattern, making it fully compatible with yohou's forecaster API
(fit / predict / observe / clone / get_params).
Subclasses only need to set _estimator_default_class to a specific
statsforecast model class (e.g., AutoARIMA).
Parameters¶
| Name | Type | Description | Default |
|---|---|---|---|
model
|
type or None
|
The statsforecast model class to wrap. Must be a subclass of
|
None
|
freq
|
str or None
|
Frequency string (pandas offset alias). If None, auto-inferred from the data at fit time. |
None
|
**params
|
dict
|
Parameters forwarded to the statsforecast model constructor. |
{}
|
Attributes¶
| Name | Type | Description |
|---|---|---|
nixtla_forecaster_ |
StatsForecast
|
The fitted Nixtla StatsForecast orchestrator (internal). |
freq_ |
str
|
The inferred or provided frequency string. |
instance_ |
_TS
|
The constructed statsforecast model instance (from |
y_columns_ |
list of str
|
Original target column names from the training data. |
See Also¶
yohou_nixtla.stats.AutoARIMAForecaster : AutoARIMA wrapper. yohou_nixtla.stats.NaiveForecaster : Naive baseline wrapper.
Source Code¶
Show/Hide source
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
Methods¶
fit(y, X_actual=None, forecasting_horizon=1, X_future=None, X_forecast=None, **params)
¶
Fit the statsforecast model to the training data.
Parameters¶
| Name | Type | Description | Default |
|---|---|---|---|
y
|
DataFrame
|
Target time series with |
required |
X_actual
|
DataFrame or None
|
Actual observation features with |
None
|
forecasting_horizon
|
int
|
Number of steps to forecast. |
1
|
X_future
|
DataFrame or None
|
Known future features with |
None
|
X_forecast
|
DataFrame or None
|
Not supported. Raises |
None
|
**params
|
dict
|
Additional metadata routing parameters. |
{}
|
Returns¶
| Type | Description |
|---|---|
self
|
Fitted forecaster. |