https://github.com/dioptx/volumepredictionassignment
Quick assignment for skill showcase
https://github.com/dioptx/volumepredictionassignment
Last synced: 9 months ago
JSON representation
Quick assignment for skill showcase
- Host: GitHub
- URL: https://github.com/dioptx/volumepredictionassignment
- Owner: dioptx
- Created: 2019-05-31T11:58:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-02T20:02:41.000Z (over 6 years ago)
- Last Synced: 2025-09-01T18:43:13.861Z (9 months ago)
- Language: Jupyter Notebook
- Size: 2.26 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Volume Stream Prediction - Tech: LSTM & SARIMA
---
### Code Coverage: ~85%
### Setup:
### Step 1:
##### | Dependencies:
1. Create a pip / conda Python 3.7 environment.
2. Navigate into the project tree.
3. Run the following command:
# Unix
sudo pip install -r requirements.txt
# Windows (Elevated)
pip install -r requirements.txt
----
### Step 2:
##### | routes.csv import:
In order for all the tests to be run successfully
place the routes.csv file that was given in the project description like this:
- module
- data
- raw
- routes.csv
----
The prediction functionality can be shown in the respective notebooks for SARIMA and LSTM models,
and follows the same mentality like the one bellow:
from src.modeling import lstmModel
from src.processing import dataProc
# Aggregated 1 hour Dataset fetch
DATASET_PATH = module_path + "/notebook/dt_agg1hour.h5"
dataset = pd.read_pickle(
DATASET_PATH)
dataset = dataProc.create_features(dataset= dataset)
# Model creation
lstmodel = lstmModel(perform_scale=True)
# Model training
lstmodel.train(dataset[start_date:end_date], evaluate=False)
# Model usage
y_pred, y = lstmodel.generate_prediction(input_data= dataset[end_date:pd.Timestamp(end_date)+pd.Timedelta(hours=48)])