Python code to re-produce results and illustrations of Destination Prediction by Trajectory Distribution Based Model detailed in publications [1] :
Two datasets are used in the publication :
-
Caltrain dataset is composed of 4127 trajectories from taxis which begin their trip at Caltrain station, San Francisco. It is a subset of the cabspotting data set [3].
-
Sao Bento dataset is composed of 19423 trajectories from taxis which begin their trip at Sao Bento station, Porto. It is a subset of train dataset of the Kaggle ECML/PKDD 15: Taxi Trajectory Prediction (I) competition [3].
The different scripts to generate the two subsets described before and to produce the clustering of these trajectories, can be found in the following repository : https://github.com/bguillouet/trajectory_classification.
All the steps described in the README.md of the trajectory_classification repository has to be executed before to run the script of this repository.
utils/config.py
: Set the variableDATA_CLUSTERING_DIR
to the path of the data directory of the trajectory_classification repository.generation_destination_prediction.py
: Run the final destination prediction method described in [1]. Save the necessary data in order to produce the figure.figure.py
: Produce the following png file :
- [1] BESSE, Philippe C., GUILLOUET, Brendan, LOUBES, Jean-Michel, et al. Destination Prediction by Trajectory Distribution-Based Model. IEEE Transactions on Intelligent Transportation Systems, 2017.