NaiveModel¶
- class NaiveModel(lag: int = 1)[source]¶
Bases:
etna.models.seasonal_ma.SeasonalMovingAverageModel
Naive model predicts t-th value of series with its (t - lag) value.
\[y_{t} = y_{t-s},\]where \(s\) is lag.
Notes
This model supports in-sample and out-of-sample prediction decomposition. Prediction component here is the corresponding target lag.
Init NaiveModel.
- Parameters
lag (int) – lag for new value prediction
- Inherited-members
Methods
fit
(ts)Fit model.
forecast
(ts, prediction_size[, ...])Make autoregressive forecasts.
get_model
()Get internal model.
load
(path)Load an object.
Get default grid for tuning hyperparameters.
predict
(ts, prediction_size[, return_components])Make predictions using true values as autoregression context (teacher forcing).
save
(path)Save the object.
set_params
(**params)Return new object instance with modified parameters.
to_dict
()Collect all information about etna object in dict.
Attributes
context_size
Context size of the model.
- params_to_tune() Dict[str, etna.distributions.distributions.BaseDistribution] [source]¶
Get default grid for tuning hyperparameters.
This grid is empty.
- Returns
Grid to tune.
- Return type
Dict[str, etna.distributions.distributions.BaseDistribution]