https://github.com/akr-2803/pytorch-time-series-forecasting
This repository implements a time series forecasting project using LSTM (Long Short-Term Memory) networks.
https://github.com/akr-2803/pytorch-time-series-forecasting
deep-learning lstm machine-learning pytorch
Last synced: 2 months ago
JSON representation
This repository implements a time series forecasting project using LSTM (Long Short-Term Memory) networks.
- Host: GitHub
- URL: https://github.com/akr-2803/pytorch-time-series-forecasting
- Owner: AKR-2803
- Created: 2024-12-06T03:44:42.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-09T19:10:34.000Z (6 months ago)
- Last Synced: 2025-03-29T07:44:55.113Z (2 months ago)
- Topics: deep-learning, lstm, machine-learning, pytorch
- Language: Jupyter Notebook
- Homepage:
- Size: 1.71 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Time Series Forecasting using LSTM📈
#### This repository demonstrates time series forecasting using a Long Short-Term Memory (LSTM) model. The main objective is to predict future trajectories based on historical data.
### 🛠How to Set Up and Replicate
1. Clone the Repository:
```bash
git clone https://github.com/AKR-2803/pytorch-time-series-forecasting
cd pytorch-time-series-forecasting
```2. Install required dependencies: You can install all the necessary dependencies using the `requirements.txt` file:
```bash
pip install -r requirements.txt
```3. **Dataset**: The dataset can be downloaded from [here](https://drive.google.com/file/d/1yYLXskgFGxi2CSMynAEX6-peN2i0_YxQ/view?usp=sharing)
4. When trying to run `model.ipynb` locally, replace this
```python
import ostrain_path = os.path.join("/kaggle/input/cse-575-project-2/train.csv")
val_path = os.path.join("/kaggle/input/cse-575-project-2/val.csv")
test_path = os.path.join("/kaggle/input/cse-575-project-2/test.csv")train_df = pd.read_csv(train_path, header=0).drop('ids', axis=1)
val_df = pd.read_csv(val_path, header=0).drop('ids', axis=1)
test_df = pd.read_csv(test_path, header=0).drop('ids', axis=1)
```with
```python
train_path = "dataset/train.csv"
val_path = "dataset/val.csv"
test_path = "dataset/test.csv"train_df = pd.read_csv(train_path, header=0).drop('ids', axis=1)
val_df = pd.read_csv(val_path, header=0).drop('ids', axis=1)
test_df = pd.read_csv(test_path, header=0).drop('ids', axis=1)
```
Make sure to replace all file paths, such as `"dataset/train.csv"`, with your appropriate system paths.5. Ensure the `dataset` (containing `train.csv`, `val.csv`, and `test.csv`) folder is placed in the same directory as `model.ipynb`. This ensures the code can correctly locate the files when executed locally.
### Output
The following output images display the results of the LSTM model's predictions on the first three trajectory instances:
| 1 | 2 | 3 |
| ------------------ | ------------------ | ------------------ |
||
|
|
#### Output trajectory for Row-1:
---
Let me know if further refinements are needed!