
ANNPrediction - Time Series Forecasting
Educational project showcasing time series modeling using artificial neural networks (MLPs) implemented from scratch in Python, with a focus on stable vs chaotic systems.
Project Overview
ANNPrediction is a didactic project that explores the modeling and forecasting of time series using artificial neural networks (ANN), specifically multi-layer perceptrons (MLP) built entirely from scratch. The goal is to investigate the predictive power of simple neural networks when applied to time series generated by a logistic function under two regimes: a stable one and a chaotic one.
Technical Development
- Data Generation: Two synthetic time series were generated using the logistic map:
- A = 2 → Stable regime.
- A = 4.2 → Chaotic regime.
- Embedding: Takens embedding was applied to structure the time series as supervised learning datasets.
- Model Architecture: Fully connected MLPs were implemented manually, including forward pass, backpropagation, and gradient descent.
- Evaluation: Performances were analyzed using MSE and visual plots, with a clear comparison between both series.
Features
- Neural Network From Scratch: No use of frameworks like TensorFlow or Keras — all computations are handled manually with NumPy.
- Clean Architecture: Code is modular and separates data preparation, model training, and evaluation.
- Visualization: Graphs illustrate both training curves and prediction accuracy, especially on chaotic dynamics.
- Comparison Focus: Emphasis on how model performance degrades with increasing complexity in time series.
Highlights
- Educational Value: Excellent resource for understanding the fundamentals of neural networks and their limitations on nonlinear systems.
- No Black Box: Every function is visible and explained, offering full transparency into the ANN mechanism.
- GitHub Repository: Available here.
Conclusion
ANNPrediction highlights the strengths and weaknesses of simple neural architectures in dealing with complex temporal patterns. While effective on stable systems, MLPs reach their limits when facing chaotic behaviors — setting the stage for more advanced models like RNNs or LSTMs in future work.