Skip to content

Modeling time series using TensorFlow, scikit-learn, SINDy, SARIMA

License

Notifications You must be signed in to change notification settings

fnauman/timeseries

Repository files navigation

timeseries

Binder Google Colab

(Click the Binder or Colab links to open the notebooks and work with them in the cloud.)

Time series modeling using:

  • Machine Learning (XGBoost, Lasso, Random Forests): xgboost_pipeline_candy.ipynb does univariate forecasting for time series data. Hyperparameter optimization is done using the scikit-learn GridSearchCV funtion. Conclusion: Lasso does better!
  • Deep Learning (TensorFlow, Keras):
  • Econometrics approach (SARIMA - Seasonal Autoregressive Integrated Moving Average): sarima_candy.ipynb. Candy data that can be downloaded from the datacamp course here.
  • FFT: fourier_ts.ipynb contains FFT extrapolation + filtering for time series prediction with synthetic periodic data.
  • Dynamical Systems
    • Reconstruction of dynamical systems using delay coordinate embeddings: For many chaotic dynamical systems, one can only observe one variable. Using delay coordinate embedding (embedding into a higher dimensional space), one can reconstruct a topologically equivalent system to the original one: Python, Julia. NOTE: Julia notebooks are currently not supported in google colab. Use juliabox to do cloud computing using Julia for free.
    • SINDy - Sparse Identification of Nonlinear Dynamics: sindy_cubicmodel.ipynb Based on the Paper. The python code is much simpler (as opposed to the MATLAB code that comes with the paper) because of scikit-learn. SINDy can be used both to discover dynamical system equations and forecasting. See also: Blog

TODO

  • Metrics: MSE/MAE, AIC/BIC (ARIMA), QQ plots, error distributions, ...
  • NN: Transformers, Attention, Seq2Seq models.
  • Different cross validation strategies: One train/test split vs the progressively bigger training dataset used with TimeSeriesSplit.

Acknowledgements This repo borrows heavily from multiple sources, please refer to the notebooks.

About

Modeling time series using TensorFlow, scikit-learn, SINDy, SARIMA

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published