https://github.com/pointer2alvee/mlp-timeseries-interpolation-extrapolation
A bivariate timeseries dataset cleaned, interpolated & extrapolated using MLP, Fourier-Features & PyTorch.
https://github.com/pointer2alvee/mlp-timeseries-interpolation-extrapolation
Last synced: 7 months ago
JSON representation
A bivariate timeseries dataset cleaned, interpolated & extrapolated using MLP, Fourier-Features & PyTorch.
- Host: GitHub
- URL: https://github.com/pointer2alvee/mlp-timeseries-interpolation-extrapolation
- Owner: pointer2Alvee
- Created: 2025-06-19T05:04:43.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-06-19T05:42:09.000Z (8 months ago)
- Last Synced: 2025-06-19T06:27:41.892Z (8 months ago)
- Language: Jupyter Notebook
- Size: 819 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ๐ mlp-timeseries-interpolation-extrapolation
#### ๐ Summary
Implementation of a Multi-Layer Perceptron (MLP) using PyTorch for modeling, interpolation, and extrapolation of bivariate time series data `(x(t), y(t))` given scalar time input `t`.
#### ๐ง Overview
This project leverages a deep learning-based MLP (Multi-Layer Perceptron) model to approximate noisy 2D time series data using Python and PyTorch. The model is trained to learn a mapping from scalar input time `t` to two-dimensional spatial coordinates `x` and `y`.
This effectively enables:
- **Interpolation** โ Estimating missing or unobserved values within the data range where 0๐ฅ (1) Data Preprocessing:
- Load and clean dataset (`data.csv`)
- Remove rows with invalid or missing entries
- Convert all values to numerical type
- Plot `x(t)` and `y(t)` for exploration
๐ค (2) MLP Model - Interpoaltion:
- Multi-layer fully connected neural network
- Input: scalar `t`, Output: vector `(x, y)`
- Layers: 1 โ 64 โ 128 โ 256 โ 2
- ReLU activations
- Output: 2D prediction of time-series position
๐ (3) Loss & Optimization:
- Loss Function: Mean Squared Error
- Optimizer: Adam
๐ Evaluation:
- Plotting predicted vs true curves
- Visualization for both interpolation & extrapolation
---
#### โ๏ธ Installation
```bash
git clone https://github.com/pointer2Alvee/mlp-timeseries-interpolation-extrapolation.git
cd mlp-timeseries-interpolation-extrapolation
# Recommended: Use virtual environment
pip install -r requirements.txt
```
##### ๐๏ธ requirements.txt (core packages):
```
pandas
numpy
matplotlib
scikit-learn
torch
```
##### ๐ป Running the App Locally
1. Open the Jupyter notebook `mlp-timeseries.ipynb`
2. Run all cells sequentially
3. Visualize plots of predicted vs actual time series
---
### ๐ Usage
- Open the project in **Google Colab** or **Jupyter Notebook**
- Adjust model layers or learning rate as needed
- Upload your own time series CSV (with `t`, `x`, `y` columns) for testing
---
### ๐งช Sample Topics Implemented
- โ
Deep MLP for regression
- โ
Time series interpolation/extrapolation
- โ
PyTorch model training
- โ
Data visualization for time series
---
### ๐งญ Roadmap
- [x] Basic MLP model for 2D regression
- [x] Time series interpolation & extrapolation
- [x] Add Fourier-based feature transformation
- [ ] Compare with traditional regressors (SVR, GPR)
---
### ๐ค Contributing
Contributions are welcomed!
1. Fork the repo
2. Create a branch: `git checkout -b feature/YourFeature`
3. Commit changes: `git commit -m 'Add some feature'`
4. Push to branch: `git push origin feature/YourFeature`
5. Open a Pull Request
---
### ๐ License
Distributed under the MIT License. See `LICENSE` for more information.
---
### ๐ Acknowledgements
- PyTorch Team
- Kaggle Community
- Open-source contributors and visualization libraries