Git Product home page Git Product logo

neutraj's Introduction

NeuTraj

This is a seed guided neural metric learning approach for calculating trajectory similarities.

Require Packages

Pytorch, Numpy, trajectory_distance

Running Procedures

Create Folders

Please create 3 empty folders:

*data: Path of the original data which is organized to a trajectory list. Each trajectory in it is a list of coordinate tuples (lon, lat).

*features: This folder contains the features that generated after the preprocessing.py. It contains four files: coor_seq, grid_seq, index_seq and seed_distance.

*model: It is used for placing the NeuTraj model of each training epoch.

Download Data

Due to the file limit of Github, we put the dataset on other sites. Please first download the data and put it in data folder. The toy dataset can be download at: https://www.dropbox.com/s/ejoo1j21vjq7t7a/toy_trajs?dl=0

Preprocessing

Run preprocessing.py. It filters the original data and maps the coordinates to grids. After such process, intermediate files which contain coor_seq, grid_seq, and index_seq are generated. Then, we calculate the pair-wise distance under the distance measure and get the seed_distance.

Training & Evaluating

Run train.py. It trains NeuTraj under the supervision of seed distance. The parameters of NeuTraj can be modified in /tools/config.py

neutraj's People

Contributors

yaodi833 avatar

Forkers

fasladodo

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.