robjhyndman / forecast

Forecasting Functions for Time Series and Linear Models
http://pkg.robjhyndman.com/forecast
1.1k stars 340 forks source link

NNetar creates unrealistic low forecasts #893

Open Someone894 opened 2 years ago

Someone894 commented 2 years ago

Sometimes I've seen some rare cases, where the nnetar-forecast produces unrealistic low forecasts. Since it is a neuronal net you probably can't do much about it, but when you don't have an example you certainly can't do something about it. So I'm providing an example anyways, maybe it helps.

x <- timetk::tk_ts(c(
  0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,
  0.000, 0.000, 0.000, 4344.544, 12642.858, 12642.858, 12068.183,
  18678.098, 13969.492, 3034.287, 14482.585, 15928.499, 20226.667,
  21239.201, 0.000
),
start = 1,
frequency = 12
)

fit <- forecast::nnetar(x)
forecast::autoplot(forecast::forecast(fit, h = 24))

grafik

It would be lovely, if you found a way to improve the nnetar-forecast for this kind of timeseries.