Skip to content

Various time-series forecasting algorithms for 1-D data in python

License

Notifications You must be signed in to change notification settings

yukimasano/ts_forecast

Repository files navigation

ts_forecast

Various time-series forecasting algorithms for 1-D data in python. (For code description see below)

In particular, the algorithms implemented/compared are: AR(I), Ridge Regression, Lasso Regression, RandomForestRegressor (those three use sklearn) and LSTM (using Keras). Hyperparameters are only optimized via gridsearch at the moment.

Data

Here I explore some time-series prediction algorithms on four different, real data sets:

  • monthly numbers of observed sunspots
  • time-series of a chaotic dynamical system (Mackey-Glass)
  • atmospheric CO2 concentration.

Results

Sunspots 91 x 12-step forecasts

Mackey-Glass chaotic dynamics

200 x 1-step forecasts

1 x 200-step forecast

CO2 1 x 100-step forecast

(Mini-)Conclusion

I find that the methods' performance is highly dependent on the data and the assumptions and problem specific knowledge are thus vital for achieving high performance.

Code

  • time_series_1.py: contains all the forecasting functions
  • ts_forecast_plots.ipynb: explores the above functions on the different datasets for 1-step and multi-step forecasts.

About

Various time-series forecasting algorithms for 1-D data in python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published