=====================
trajectory_distance is a Python module for computing distance between trajectory objects. It is implemented in both Python and Cython.
trajectory_distance contains 9 distances between trajectory.
- SSPD (Symmetric Segment-Path Distance)
- OWD (One-Way Distance)
- Hausdorff
- Frechet
- Discret Frechet
- DTW (Dynamic Time Warping)
- LCSS (Longuest Common Subsequence)
- ERP (Edit distance with Real Penalty)
- EDR (Edit Distance on Real sequence)
trajectory_distance is tested to work under Python 2.7.
The required dependencies to build the software are NumPy >= 1.9.1, Cython >= 0.21.2, shapely >= 1.5.6, Geohash and a working C/C++ compiler.
This package uses distutils. To install in your home directory, use:
python setup.py install
You only need to import the distance module.
import traj_dist.distance as tdist
All distances are in this module. There is also two extra function 'cdist', and 'pdist' to compute distances between all trajectories in a list.
Trajectory should be represented as 2-Dimensions numpy array. See traj_dist/example.py file.
Some distance requires extra-parameters. See the help function for more information about how to use each distance.
- P. Besse, B. Guillouet, J.-M. Loubes, and R. Francois, “Review and perspective for distance based trajectory clustering,” arXiv preprint arXiv:1508.04904, 2015.
- B. Lin and J. Su, “Shapes based trajectory queries for moving objects,” in Proceedings of the 13th annual ACM international workshop on Geographic information systems . ACM, 2005, pp. 21–30.
- F. Hausdorff, “Grundz uge der mengenlehre,” 1914
- M. M. Fr echet, “Sur quelques points du calcul fonctionnel,” Rendiconti del Circolo Matematico di Palermo (1884-1940) , vol. 22, no. 1, pp. 1–72, 1906.
- H. Alt and M. Godau, “Computing the frechet distance between two polygonal curves,” International Journal of Computational Geometry & Applications , vol. 5, no. 01n02, pp. 75–91, 1995.
- D. J. Berndt and J. Clifford , “Using dynamic time warping to find patterns in time series.” in KDD workshop, vol. 10, no. 16. Seattle, WA, 1994, pp. 359–370
- M. Vlachos, G. Kollios, and D. Gunopulos, “Discovering similar multi- dimensional trajectories,” in Data Engineering, 2002. Proceedings. 18th International Conference on .IEEE, 2002, pp. 673–684
- L. Chen and R. Ng, “On the marriage of lp-norms and edit distance,” in Proceedings of the Thirtieth international conference on Very large data bases-Volume 30 . VLDB Endowment, 2004, pp. 792–803.
- L. Chen, M. T. ̈ Ozsu, and V. Oria, “Robust and fast similarity search for moving object trajectories,” in Proceedings of the 2005 ACM SIGMOD international conference on Management of data . ACM, 2005, pp. 491–502.
- J.-G. Lee, J. Han, and K.-Y. Whang, “Trajectory clustering: a partition- and-group framework,” in Proceedings of the 2007 ACM SIGMOD international conference on Management of data . ACM, 2007, pp. 593–604.