Giter VIP home page Giter VIP logo

time-series-forecasting-rnn-tensorflow's Introduction

Highlight:

  • This is a Time Series Forecasting problem.
  • The purpose of this project is to Forecast next timestamp given a sequence of history values.
  • This module was built with Recurrent Neural Network (RNN) on top of Tensorflow and Keras.

Why apply RNN (LSTM) on time series datasets?

The expression long short-term refers to the fact that LSTM is a model for the short-term memory which can last for a long period of time. An LSTM is well-suited to classify, process and predict time series given time lags of unknown size and duration between important events.

Recurrent neural networks are a type of neural network that add the explicit handling of order in input observations.

This capability suggests that the promise of recurrent neural networks is to learn the temporal context of input sequences in order to make better predictions. That is, that the suite of lagged observations required to make a prediction no longer must be diagnosed and specified as in traditional time series forecasting, or even forecasting with classical neural networks. Instead, the temporal dependence can be learned, and perhaps changes to this dependence can also be learned.

Data:

  • Input: a sequence of history values

    • 2017-01-01,339.7
    • 2017-02-01,440.4
    • 2017-03-01,315.9
    • 2017-04-01,439.3
    • 2017-05-01,401.3
    • 2017-06-01,437.4
    • 2017-07-01,575.5
    • 2017-08-01,407.6
    • 2017-09-01,682.0
    • 2017-10-01,475.3
    • 2017-11-01,581.3
    • 2017-12-01,646.9
  • Output: the value on next timestamp

    • 2018-01-01,678.5

Train & Predict:

  • Example 1: python3 train_predict.py ./data/sales.csv ./training_config.json
  • Example 2: python3 train_predict.py ./data/daily-minimum-temperatures-in-me.csv ./training_config.json

Reference:

time-series-forecasting-rnn-tensorflow's People

Contributors

jiegzhan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

time-series-forecasting-rnn-tensorflow's Issues

Why did you use model.fit for training?

To train a model in Tensorflow I checked other sources they use sessions in loop in order to train model.

with tf.Session() as sess:
   init.run()
   for ep in range(epochs):
         sess.run(training_op, feed_dict={X: x_batches, y:y_batches})
         mse = loss.eval(feed_dict={X: x_batches, y:y_batches})

Why did you use model.fit?

"Predicted" and "Actual" labels on the final chart are inversed

In train_predict.py there is a mix up with labels. What should be "Actual" is shown as "Predicted" and vice versa:

        # Plot graph: predicted VS actual
        plt.subplot(111)
        plt.plot(predicted_raw, label='Actual')
        plt.plot(y_test_raw, label='Predicted')
        plt.legend()
        plt.show()

Multiple inputs

Hi,

I want to use your model for a time-series that has 6 inputs and just 1 output, can you help me? I think i have to upload the file with 6 columns, but i dont know how to read it and manage all this inputs.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.