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.

Init NaiveModel.

Parameters

lag (int) – lag for new value prediction

Inherited-members

Methods

fit(ts)

Fit model.

forecast(ts, prediction_size)

Make predictions.

get_model()

Get internal model.

load(path)

Load an object.

predict(ts, prediction_size)

Make predictions with using true values as autoregression context if possible (teacher forcing).

save(path)

Save the object.

to_dict()

Collect all information about etna object in dict.

Attributes

context_size

Context size of the model.