Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

subarnop/TimeSeriesPredictionLSTM

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Time Series Prediction using LSTM Recurrent Neural Network

A time series is a series of data points indexed in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Time series analysis comprises methods for analyzing time series data in order to extract meaningful statistics and other characteristics of the data. Time series forecasting/prediction is the use of a model to predict future values based on previously observed values.
We work on a dataset consisting of the daily wage of England (1260-1994) in pounds. This dataset a very rough dataset and the biggest challenge is that when we break it into 3:1 Train and Test, the charecterstics changes highly in Test part. This stiff growth and changes in wage is mainly due to the Industrial Revolution during the 1820s.

Generally time series prediction is done using well established statistical models such as SMA, ARIMA, ARIMAX but we will approach it using Recurrent Neural Nets and show a convincing result. Long Short Term Memory networks – usually just called “LSTMs” – are a special kind of RNN, capable of learning long-term dependencies. They were introduced by Hochreiter & Schmidhuber (1997), and were refined and popularized by many people in their work. They work tremendously well on a large variety of problems, and are now widely used.

By traing the network for 100 epochs with 1 look back window we got an Root Mean square (RMSE) error of 1.99 which is quite an acceptable result. We then finetune network updating the look back window size and check the result training for 100 epochs.
look back Train Score (RMSE) Test Score (RMSE)
01 0.57 1.99
03 0.55 1.70
05 0.58 1.58
10 0.54 17.01

Thus we can see that the previous 5 years have significant influence on the value of the wages in the dataset. Here we display the resulting graphgs due to fine tuning the look back window:

Usage:

  1. Download/Clone the repository and get the dependenies.
  2. Set the desired look_back
$python3 lstm.py

Happy To Code ... Happy To Live :octocat:

About

Time series prediction on real daily wage of England 1260-1994 using LSTM Recurrent Neural Network.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.