Coder Social home page Coder Social logo

time-series-prediction's Introduction

Codebase for "Time-series prediction" with RNN, GRU, LSTM and Attention

Authors: Jinsung Yoon Contact: [email protected]

This directory contains implementations of basic time-series prediction using RNN, GRU, LSTM or Attention methods. To run the pipeline, simply run python3 -m main_time_series_prediction.py.

Stages of time-series prediction framework:

  • Load dataset (Google stocks data)
  • Train model: (1) RNN based: Simple RNN, GRU, LSTM (2) Attention based
  • Evaluate the performance: MAE or MSE metrics

Command inputs:

  • train_rate: training data ratio
  • seq_len: sequence length
  • task: classification or regression
  • model_type: rnn, lstm, gru, or attention
  • h_dim: hidden state dimensions
  • n_layer: number of layers
  • batch_size: the number of samples in each mini-batch
  • epoch: the number of iterations
  • learning_rate: learning rates
  • metric_name: mse or mae

Example command

$ python3 main_time_series_prediction.py 
--train_rate 0.8 --seq_len 7 --task regression --model_type lstm
--h_dim 10 --n_layer 3 --batch_size 32 --epoch 100 --learning_rate 0.01
--metric_name mae

Outputs

  • MAE or MSE performance of trained model

time-series-prediction's People

Contributors

jsyoon0823 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  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

time-series-prediction's Issues

Early stop with the attention model

I must say I really like your solution. Your code is easy to understand and read. I am interested if you have any ideas on how to use Early stop in the basic_attention model?

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.