Abstract
We provide the first comprehensive study on how to classify trajectories using only their spatial representations, measured on 5 real-world datasets. Our comparison considers 20 distinct classifiers arising either as a KNN classifier of a popular distance, or as a more general type of classifier using a vectorized representation of each trajectory. We additionally develop new methods for how to vectorize trajectories via a data-driven method to select the associated landmarks, and these methods prove among the most effective in our study. These vectorized approaches are simple and efficient to use, and also provide state-of-the-art accuracy on an established transportation mode classification task. In all, this study sets the standard for how to classify trajectories, including introducing new simple techniques to achieve these results, and sets a rigorous standard for the inevitable future study on this topic.















Similar content being viewed by others
References
Besse PC, Guillouet B, Loubes J-M, Royer F (2016) Review and perspective for distance-based clustering of vehicle trajectories. IEEE Trans Intell Transp Syst 17:3306–3317
Buchin K, Driemel A, Gudmundsson J, Horton M, Kostitsyna I, Loffler M ( 2019) Approximating \((k,l)\)-center clustering for curves. In: SODA
Driemel A, Krivosija A, Sohler C ( 2016) Clustering time series under the Frechet distance. In: ACM-SIAM Symposium on Discrete Algorithms
Buchin K, Driemel A, van de L’Isle N, Nusser A ( 2019) klcluster: Center-based clustering of trajectories. In: Proceedings of the 27th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, pp. 496– 499
Zhang Z, Huang K, Tan T ( 2006) Comparison of similarity measures for trajectory clustering in outdoor surveillance scenes. In: 18th International Conference on Pattern Recognition. ICPR’06
Astefanoaei M, Cesaretti P, Katsikouli P, Goswami M, Sarkar R ( 2018) Multi-resolution sketches and locality sensitive hashing for fast trajectory processing. In: SIGSPATIAL
Cuturi M ( 2011) Fast global alignment kernels. In: Proceedings of the 28th International Conference on Machine Learning
Magdy N, Sakr MA, Mostafa T, El-Bahnasy K(2015) Review on trajectory similarity measures. In: IEEE Seventh International Conference on Intelligent Computing and Information Systems. ICICIS ( 2015)
Alt H, Knauer C, Wenk C (2004) Comparison of distance measures for planar curves. Algorithmica, 45–58
de Freitas NCA, da Silva TLC, de Macêdo JAF, Junior LM, Cordeiro MG ( 2021) Using deep learning for trajectory classification. In: Proceedings of the 13th International Conference on Agents and Artificial Intelligence (ICAART 2021)
Garcia J, Concha OP, Molina JM, de Miguel G ( 2006) Trajectory classification based on machine-learning techniques over tracking data. In: IEEE 9th International Conference on Information Fusion
Lin W-Y, Hsieh C-Y (2013) Kernel-based representation for 2d/3d motion trajectory retrieval and classification. Pattern Recogn 46:662–670
Liua L, Liua F, Ky B (2019) Data mining-based model for motion target trajectory prediction. J Intell Fuzzy Syst 37:371–379
Sbalzarini IF, Theriot J, Koumoutsakos P ( 2002) Machine learning for biological trajectory classification applications. In: Proceedings of the CTR Summer Program
Sharma LK, Vyas OP, Schieder S, Akasapu AK ( 2010) Nearest neighbour classification for trajectory data. In: ICT: International Conference on Advances in Information and Communication Technologies
Xu W, Zhang Y, Lu J, Wang J (2011) Hdp-hmm-scfg: a novel model for trajectory representation and classification. Procedia Eng 15:629–633
Zhou F, Gao Q, Trajcevski G, Zhang K, Zhong T, Zhang F (2018) Trajectory-user linking via variational autoencoder. In: Proceedings of the 27th International Joint Conference on Artificial Intelligence
Gao Q, Zhou F, Zhang K, Trajcevski G, Luo X, Zhang F ( 2017) Identifying human mobility via trajectory embeddings. In: AAAI
Junior AS, Renso C, Matwin S (2017) An active learning system for trajectory classification. IEEE Comput Graphics Appl 37(5):28–39
Soleymani A, Cachat J, Robinson K, Dodge S, Kalueff AV, Weibel R (2014) Integrating cross-scale analysis in the spatial and temporal domains for classification of behavioral movement. J Spatial Inf Sci 8:1–25
Patel D, Sheng C, Hsu W, Lee ML ( 2012) Incorporating duration information for trajectory classification. In: 28th International Conference on Data Engineering
Lee J-G, Han J, Li X, Cheng H (2011) Mining discriminative patterns for classifying trajectories on road networks. IEEE 9th Int Conf Inf Fusion 23(5):713–726
Dodge S, Weibel R, Forootan E (2009) Revealing the physics of movement: Comparing the similarity of movement characteristics of different types of moving objects. Comput Environ Urban Syst 33(6):419–434
Lee, J.-G., Han, J., Li, X., Gonzalez, H.: Traclass: trajectory classification using hierarchical region-based and trajectory-based clustering. In: Proceedings of the VLDB Endowment. ICPR’06 ( 2008)
Murray B, Perera LP (2022) Ship behavior prediction via trajectory extraction-based clustering for maritime situation awareness. J Ocean Eng Sci 7:1–13
Dabiri S, Heaslip K (2018) Inferring transportation modes from gps trajectories using a convolutional neural network. Transp Res Part C 86:360–371
Dabiri S, Lu C-T, Heaslip K, Reddy CK (2020) Semi-supervised deep learning approach for transportation mode identification using gps trajectory data. IEEE Trans Knowl Data Eng 32:1010–1023
Endo Y, Toda H, Nishida K, Kawanobe A (2016) Identifying different transportation modes from trajectory data using tree-based ensemble classifiers. Pacific-Asia Conf Knowl Discov Data Min 6:54–66
Fang S-H, Liao H-H, Fei Y-X, Chen K-H, Huang J-W, Lu Y-D, Tsao Y (2016) Transportation modes classification using sensors on smartphones. Sensors 16:1324
Wang H, Liu G, Duan J, Zhang L ( 2017) Detecting transportation modes using deep neural network. IEICE Trans Inf & Syst 100, 1132– 1135
Zheng Y, Chen Y, Li Q, Xie X, Ma W-Y ( 2008) Understanding mobility based on gps data. Proceedings of the 10th International Conference on Ubiquitous Computing. ACM 100, 312– 321
Zheng Y, Xie X ( 2008) Learning transportation mode from raw gps data for geographic applications on the web. Proceedings of the 17th World Wide Web Conference 86, 247– 256
Etemad M, Júnior AS, Matwin S ( 2018) Predicting transportation modes of gps trajectories using feature engineering and noise removal. In: Advances in Artificial Intelligence
Varlamis I ( 2015) Evolutionary data sampling for user movement classification, in evolutionary computation. In: IEEE Congress on Evolutionary Computation, CEC 2015, Sendai, Japan
Tragopoulou S, Varlamis I, Eirinaki M ( 2014) Classification of movement data concerning user’s activity recognition via mobile phones. In: Proceedings of the 4th International Conference on Web Intelligence, Mining and Semantics (WIMS14), p. 42
Phillips JM, Tang P( 2019) Simple distances for trajectories via landmarks. In: ACM GIS SIGSPATIAL
Phillips JM, Pourmahmood-Aghababa H ( 2021) Orientation-preserving vectorized distance between curves. In: Mathematical and Scientific Machine Learning (MSML)
Cruz MO, Macedo H, Barreto R, Guimaraes A (2016) GPS Trajectories Data Set
Zheng Y, Fu H, Xie X, Ma W-Y, Li Q (2011) Geolife GPS Trajectory Dataset - User Guide
Duan H, Ma F, Miao L, Zhang C (2022) A semi-supervised deep learning approach for vessel trajectory classification based on ais data. Ocean Coast Manag 218:106015
Meng L, Zhang S (2020) Inferring travel modes from trajectory data based on hidden markov model. Int Conf Trans Dev 2020(7):95–103
Papadopoulos AN ( 2008) Trajectory retrieval with latent semantic analysis. In: Proceedings of the 2008 ACM Symposium on Applied Computing, pp. 1089– 1094
Pourmahmood-Aghababa, H., Phillips, J.M.: Classifying Spatial Trajectories (Python Implementation). https://github.com/aghababa/Classifying-Spatial-Trajectories
Alt H, Godau M (1995) Computing the fréchet distance between two polygonal curves. JCG Appl 5:75–91
Guillouet, B., Hinsbergh, J.V.: A Python Package for Computing Distance Between 2D Trajectories. https://github.com/bguillouet/traj-dist
Eiter T, Mannila H (1994) Computing discrete Frechet distance. Technical report, Christian Doppler Laboratory for Expert Systems
Hausdorff F (1914) Grundzüge der mengenlehre. Leipzig
Berndt DJ, Clifford J (1994) Using dynamic time warping to find patterns in time series. KDD Workshop 10:359–370
Salvador S, Chan P (2007) Fastdtw: Toward accurate dynamic time warping in linear time and space. Intell Data Anal 11:561–580
Tanida K Python Implementation of FastDTW. https://pypi.org/project/fastdtw
Cuturi M, Blondel M ( 2017) Soft-dtw: a differentiable loss function for time-series. In: Proceedings of ICML
Blondel M, Python Implementation of soft-DTW. https://github.com/mblondel/soft-dtw
Vlachos M, Gunopulos D, Kollios G ( 2002) Discovering similar multidimensional trajectories. In: ICDE
Chen L, Özsu MT, Oria V (2005) Robust and fast similarity search for moving object trajectories. In: SIGMOD, pp. 491– 502
Chen L, Ng R (2004) On the marriage of lp-norms and edit distance. Proceedings of the 30th International Conference on Very Large Data Bases (VLDB) 30, 792– 803
Khaiiate-Ajami H, Pourmahmood-Aghababa H, Phillips JM (2021) Trjtrypy. https://pypi.org/project/trjtrypy
Databases, in University of Illinois at Chicago MCL (2006) Real Trajectory Data. https://www.cs.uic.edu/~boxu/mp2p/gps_data.html
Yuan J, Zheng Y, Zhang C, Xie W, Xie X, Sun G, Huang Y (2010) T-drive: driving directions based on taxi trajectories. In: 18th SIGSPATIAL International Conference on Advances in Geographic Information Systems, GIS
Yuan J, Zheng Y, Xie X, Sun G ( 2011) Driving with knowledge from the physical world. In: The 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining
Chen T, Guestrin, C ( 2016) Xgboost: A scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 785– 794
Meade J, Biro D, Guilford T( 2005) Homing pigeons develop local route stereotypy. In: Proceedings of the Royal Society B, vol. 272, pp. 17– 23
Mann R, Freeman R, Osborne M, Garnett R, Armstrong C, Meade J, Biro D, Guilford T, Roberts S (2011) Objectively identifying landmark use and predicting flight trajectories of the homing pigeon using gaussian processes. J R Soc Interface 8(55):210–219
Mann RP, Armstrong C, Meade J, Robin F, Biro D, Guilford T (2014) Landscape complexity influences route-memory formation in navigating pigeons. Biol Let 10:1020130885
Acknowledgements
Jeff Phillips thanks his support from NSF CCF-1350888, CNS-1514520, CNS-1564287, IIS-1816149, CCF-2115677, and from Visa Research.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Pourmahmood-Aghababa, H., Phillips, J.M. An experimental study on classifying spatial trajectories. Knowl Inf Syst 65, 1587–1609 (2023). https://doi.org/10.1007/s10115-022-01802-5
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10115-022-01802-5