💡 implementing Time Series NBEAT algoritm with RIVIN over 50 dataset given.
Python 3.7 or higher
Tensorflow (GPU is prefered)
Pytorch
csv
numpy
os
Pandas
Matplotlib
Things to remember:
- There are 2 files one for running the scrpit over google colab named
NBEATS_Colab.ipynb
another oneNBEATS_windows.ipynb
to run locally over windows machine - The scipt is writtern in Jupyter Notebook
ipynb
- The Code plots the CSV data in a file
temp.csv
- The scrpit saves the plot shown in the folder in ```content``
- When The Whole code is Run once the plots are visible and files are stores in machine instance
- The scripts is written in way that can be run over google colab without downloading the files (there are built in scripts that download the files and shows and saves the plots file over running instance machine on google colab)
- The code when run once shows the various plots in the insstance which on time of initialisation starts with
0.csv
and saves the plot at online machine instance incontent
folder - The
MAE, MSE, RMSE, MAPE, MASE
value of the file are saved in temp.csv file with the first number indicating file index number in the samecontent
folder - When the whole script is run the code now moves to the next file then shows and saves the next file PLOT and
append
the metrics data overtemp.csv
file
- when the code is run once more it moves onto the next csv data and saves its data in the files ** for example -> csv
- First ensure libraries are installed in you enviornment on which you are gonna run
- Create folder named
content
in the same directory as the path of code - put all the CSv data file from 0-49.csv in
content
folder - create two empty CSV file inside
content
folder named-1.csv
andtemp.csv
* (alternatively) you can download https://github.com/tambeanuj123/tambeanuj123/blob/main/dataset50/temp.csvand
https://github.com/tambeanuj123/tambeanuj123/blob/main/dataset50/temp.csv files and put them incontent
folder
- running the instance once will show you plot of the data
- the plots are saved as png file with the files corresponding name such as
img1_first.png
,img1_prediction.png
,img_full_prediction.png
- The temp.csv file gets appended index of file and
MAE, MSE, RMSE, MAPE, MASE
of the prediction values in the same order
once instance is completed the process is repeated for next index.csv file in loop and data is saved
filecount=0
# change this value to the index of file you want to run first- NOTE keep this in mind this will only work for the first instance if you want to reset this clear the
temp.csv
in foldercontents
](https://drive.google.com/drive/folders/13ifIVRwStWzRVUqhKVWwwa2-NNTE3hb2?usp=sharing)
NBEATS official implementation: https://github.com/ElementAI/N-BEATS
NBEATS paper: https://arxiv.org/abs/1905.10437
RIVIN paper: https://openreview.net/pdf?id=cGDAkQo1C0p dataset link: https://drive.google.com/drive/folders/13ifIVRwStWzRVUqhKVWwwa2-NNTE3hb2?usp=sharing