Git Product home page Git Product logo

trajectorynet's Introduction

TrajectoryNet

Slides

For a quick overview of the paper, please refer to the slides

Title

TrajectoryNet: An Embedded GPS Trajectory Representation for Point-based Classification Using Recurrent Neural Networks

Authors: Xiang Jiang, Erico N de Souza, Ahmad Pesaranghader, Baifan Hu, Daniel L. Silver and Stan Matwin

Abstract: Understanding and discovering knowledge from GPS (Global Positioning System) traces of human activities is an essential topic in mobility-based urban computing. We propose TrajectoryNet-a neural network architecture for point-based trajectory classification to infer real world human transportation modes from GPS traces. To overcome the challenge of capturing the underlying latent factors in the low-dimensional and heterogeneous feature space imposed by GPS data, we develop a novel representation that embeds the original feature space into another space that can be understood as a form of basis expansion. We also enrich the feature space via segment-based information and use Maxout activations to improve the predictive power of Recurrent Neural Networks (RNNs). We achieve over 98% classification accuracy when detecting four types of transportation modes, outperforming existing models without additional sensory data or location-based prior knowledge.

Contact

[email protected]

Please feel free to email me in case you have any questions with the code. There are a lot of redundant codes that I have not got a chance to clean up. Sorry about this clutter!

Dependencies

The follwoing softwares are required for this source code.

  • Python 3.5
  • Tensorflow 1.4.1
  • sklean 0.18.1
  • numpy 1.12.0
  • R (optional for preprocessing)

Data

The original dataset can be found here. We preprocessed a subset of the data in the data directory. This dataset contains features in .csv format as well as .npy format:

  • csvdata.csv: include data of four classes (car, bike, drive and walk) with longitudes, latitudes, speeds and other features
  • encodedcsv.zip: the same data after discretization and one-hot-encoding
  • npy.zip: the same data in .npy format. This can be used to train the model directly.

If you want to train the model without any preprocessing, please unzip the numpy data before training the model:

cd ./data
unzip npy.zip

Network Configurations

The file config.json includes the configurations of the model:

  • training, validation and test set selection
  • number of hidden nodes in each layer
  • learning rate
  • mini-batch size
  • number of layers
  • number of epochs
  • whether to checkpoint the model after training
  • whether to restore the model before training
  • the size of truncated sequences
  • frequency to evaluate the model while training
  • number of threads
  • whether to use GPU during training
  • etc.

Network Training

python trajectoryNet.py

Preprocessing

In case you are interested in the preprocessing and discretization of the data, please refer to file preprocess.R.

After the preprocess data are stored in a .csv file, it is required to run create_npy.py to transform the data into .npy format to get ready to import to Tensorflow.

trajectorynet's People

Contributors

xiangjjj avatar

Watchers

 avatar

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.