This is my time series forecasting system leveraging ARIMA/SARIMA, Prophet, LSTM networks and ensemble methods along with automated feature engineering for real-time predictive analytics on simulated streaming data. The project includes automated feature engineering (lag features, rolling statistics, date-time components) and simulates real-time streaming data ingestion to update forecasts in near real-time.
The project was a part of my freelance work, published with permission. For privacy purposes, data was removed.
What's inside:
- Time series models
ARIMA/SARIMA using statsmodels, Prophet forecasting and LSTM networks built with TensorFlow/Keras. - Feature engineering
Automated generation of lag features, rolling averages and date-time components. - Ensemble forecasting
Combination of classical and ML-based forecasts using stacking ensembles. - Real-time simulation
Demonstrates near real-time forecasting with simulated streaming data. - Evaluation metrics
MAE, RMSE, MAPE and custom time-series cross-validation routines. - Modular code
Clean, modular and well-documented code following best practices and designed for production deployment.
Installation (clone, navigate, create a venv, install dependencies):
git clone https://github.com/avrtt/etsy.git
cd etsy
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Run the main script to execute the entire pipeline:
python src/main.py
The main script will:
- Generate or load synthetic time series data
- Apply feature engineering
- Train multiple forecasting models
- Evaluate each model using various metrics
- Simulate streaming data updates and display real-time forecast updates
Project structure:
- data/ contains the synthetic data (generated automatically if not provided)
- src/ contains the Python modules
data_loader.py
: data ingestion and synthetic data generationfeature_engineering.py
: automated feature generation routinesevaluation.py
: functions for calculating forecast evaluation metricsstreaming.py
implements simulated streaming data forecastingmain.py
orchestrates the complete forecasting pipeline- models/ contains implementations for:
arima_model.py
: ARIMA/SARIMA-based forecastingprophet_model.py
: forecasting using Prophetlstm_model.py
: LSTM network for deep learning forecastsensemble_model.py
: ensemble method combining multiple forecasts
Contributions, issues and feature requests are welcome. Apache 2.0 license.