Code for time-series forecasting by using a recurrent neural network model

Published: 03-08-2020| Version 3 | DOI: 10.17632/yp4d95pk7n.3
Mohamed Hawas


General description: - This dataset comprises a Jupyter notebook that includes a Python code for sequence-to-sequence time-series forecasting by training and evaluating recurrent neural network models. - The code was developed to enable rapid and wide-scale development, production and evaluation of time-series models and predictions. - The RNN's architecture has a convolutional layer for handling inputs, within a composite autoencoder’s neural network. Instructions for usage: - The Python code is located in a Jupyter notebook that can be opened online or locally, by using a Jupyter Notebook compatible platform as: (accessed 11 July 2020). (accessed 11 July 2020). - In order to use the code, a data source should exist in a "csv" file extension and it should be named as 'data_input.csv' or alternatively, an online link to the data source could be entered when executing the code. The data source should have first 4 columns for metadata. The unique name or identifier for each row will be located in the 2nd column, otherwise, a change has to be made in the code in the gen_data function (line 282) and line 286 in case of the need to change metadata columns size, into less or more. The rest of the columns indicate the accumulated number or value in each column. Important parameters: - target_pred: specifies which row in the data to predict. - crop_point: specifies which data point to crop the time-series data at, ex. training data = before crop_point, evaluation data = after crop_point. - time_steps: specifies which time-steps to use, ex. 15 or 20, meaning: 15 for X and 15 for Y in the sequence-to-sequence model. - RNN parameters: ex. batch size, epochs, layer sizes, RNN architecture (GRU or LSTM). - ext: specifies the end date of predictions.