-
Václav Tran authoredVáclav Tran authored
Semester Project for NI-MVI
This semester project (SP) focuses on "A first exploration of the new minGRU models for time series analysis".
Supervisor: Ippocratis Saltas, ippocratis.s@gmail.com
Detailed Assignment Description
As part of this assignment, implement in PyTorch a minGRU architecture following the specifications from Feng et al. (2024).
We perform a first exploration of the potential of the recently-introduced minGRU models for parameter inference and forecasting in time series. Which consists of three tasks:
- Parameter inference of sinusoidal waves
- Time series forecasting on sinusoidal waves
- Time series forecasting on market stock data
Dataset Information
This project utilizes datasets tailored to the specific requirements of each task. Below is an overview:
1. Parameter Inference (Sinusoidal Waves)
- Description: Synthetic dataset for estimating sinusoidal wave parameters (amplitude, frequency).
-
Composition:
- 5000 samples with 100 data points per sinusoidal wave.
- Amplitude and frequency randomly varied within predefined ranges. (0-10)
2. Time Series Forecasting (Sinusoidal Waves)
- Description: Synthetic dataset for predicting future points in sinusoidal waves.
-
Composition:
- 5000 samples with 100 input points and 1 target point.
- Amplitude and frequency randomly varied within predefined ranges. (0-10)
3. Stock Market Forecasting
-
Description: Real-world stock data sourced via
yfinance
. -
Details:
- IBM stock data (2014-01-01 to 2024-04-01).
- Daily closing prices as primary feature.
- Sliding window approach: 60 time steps for input, predicting the next 60.
Requirements
To run this project, you will need the following dependencies:
- Python 3.x
- PyTorch
- torchmetrics
- NumPy
- Matplotlib
- Jupyter Notebook
- Darts
- Prophet
Instructions for Running
-
Run the following Jupyter notebook for parameter inference of sinusoidal waves:
mingru_notebook_param_infer.ipynb
-
Run the following Jupyter notebook for time series forecasting of sinusoidal waves:
mingru_notebook_forecasting.ipynb
This notebook also contains code for loading models from "trained_models" directory.
-
Run the following Jupyter notebook for minGRU time series forecasting of stock data:
stock_data_mingru.ipynb
-
Run the following Jupyter notebook for DARTS models time series forecasting of stock data:
stock_data_darts.ipynb