Giter Club home page Giter Club logo

traffic-prediction's Introduction

LSTM Based Traffic Prediction

This project seeks to use LSTM for traffic prediction using the Keras frontend for Theano. Hyperparameter optimisation is used to find the best set of parameters for the network.

Usage

Run:

pip install -r requirements.txt

Then edit main.py so that it uses your own parameters for the network. It will attempt to store hyperparameter results in mongodb. You can use show_results.py to view them. Please keep in mind this for experimentation only and not appropriate for production.

Run using:

python main.pymain.py <steps eg. 1> </path/to/data.csv> <train_test_split eg. 0.75> <num_epochs eg. 10> <model_trials eg. 20>

The CSV should have a the following format:

timestamp,16,17,18,19,20,21
2011-12-31 23:55:00,4,6,8,13,3,0
2012-01-01 00:00:00,5,7,8,10,3,2
2012-01-01 00:05:00,3,3,7,15,1,2
2012-01-01 00:10:00,9,3,3,7,1,1
2012-01-01 00:15:00,3,4,12,15,2,0
2012-01-01 00:20:00,7,5,11,19,2,2

Basically, the first column must be a timestamp and the rest integer values.

Scripts are also provided to speed up processing via Sun Grid Engine. Though they are unreliable because of the length of time it takes for theano to compile the models. You will also need CUDA and a compatible card if you want the speedups they provide.

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.