Skip to main content
Log in

Transportation Mode Detection by Using Smartphones and Smartwatches with Machine Learning

  • Transportation Engineering
  • Published:
KSCE Journal of Civil Engineering Aims and scope Submit manuscript

Abstract

Transportation Mode Detection (TMD) is important in planning new transportation projects as well as improving existing ones. Therefore, this study aims to develop predictive modes of transportation through the use of smartphone data and smartwatches and the use of machine learning techniques. To achieve the objective of this study, a review of the studies related to the use of algorithms to predict transportation modes was prepared. Besides, on the practical side, the Physical Activity for Smart Travel (PASTA) platform has been developed. Two groups of participants were recruited in Michigan and Texas to obtain the required data for the study. Daily activities have been classified into activities related to transportation (trips) and non-related to transportation (work, home, shopping, etc.), then focusing exclusively on transportation activities to determine their modes. In this study, four machine learning methods were used for prediction (Random Forest, Extreme Gradient Boosting, Artificial Neural Network, and Support Vector Machine) and using the data of physical activities as a new feature not used in prior studies. The accuracy of the methods of transportation mode prediction was compared through the training and testing phases. The results of the predictions were compared with the activities verified by the participants. The results showed that the method of Random Forest performed better than other methods. This study provides the appropriate tools for decision-makers to help them understand people’s travel behaviors.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  • Alanazi HO, Abdullah AH, Qureshi KN (2017) A critical review for developing accurate and dynamic predictive models using machine learning methods in medicine and health care. Journal of Medical Systems 41(4), DOI: https://doi.org/10.1007/s10916-017-0715-6

  • Alotaibi B (2020) Transportation mode detection by embedded sensors based on ensemble learning. IEEE Access 8:145552–145563, DOI: https://doi.org/10.1109/ACCESS.2020.3014901

    Article  Google Scholar 

  • Antar AD, Ahmed M, Ishrak MS, Ahad MA (2018) A comparative approach to classification of locomotion and transportation modes using smartphone sensor data. Proceedings of the 2018 ACM international symposium on wearable computers, October 8–12, Singapore

  • Asgari F, Clemencon S (2018) Transport mode detection when fine-grained and coarse-grained data meet. Proceedings of the 3rd IEEE international conference on intelligent transportation engineering (ICITE), September 3–5, Singapore

  • Ashqar HI, Almannaa MH, Elhenawy M, Rakha HA, House L (2019) Smartphone transportation mode recognition using a hierarchical machine learning classifier and pooled features from time and frequency domains. IEEE Transactions on Intelligent Transportation Systems 20(1):244–252, DOI: https://doi.org/10.1109/TITS.2018.2817658

    Article  Google Scholar 

  • Balli S, Saǧbaş EA (2018) Diagnosis of transportation modes on mobile phone using logistic regression classification. IET Software 12(2): 142–151, DOI: https://doi.org/10.1049/iet-sen.2017.0035

    Article  Google Scholar 

  • Bedogni L, Di Felice M, Bononi L (2016) Context-aware Android applications through transportation mode detection techniques. Wireless Communications and Mobile Computing 16(16):2523–2541, DOI: https://doi.org/10.1002/wcm.2702

    Article  Google Scholar 

  • Brown DE (2016) Text mining the contributors to rail accidents. IEEE Transactions on Intelligent Transportation Systems 17(2):346–355, DOI: https://doi.org/10.1109/TITS.2015.2472580

    Article  Google Scholar 

  • Buehler R, Götschi T, Winters M (2016) Moving toward active transportation: How policies can encourage walking and bicycling. Active Living Research, Zurich, Switzerland

  • Castrogiovanni P, Fadda E, Perboli G, Rizzo A (2020) Smartphone data classification technique for detecting the usage of public or private transportation modes. IEEE Access 8:58377–58391, DOI: https://doi.org/10.1109/ACCESS.2020.2982218

    Article  Google Scholar 

  • Chapleau R Gaudette P, Spurr T (2019) Application of machine learning to two large-sample household travel surveys?: A characterization of travel modes. Transportation Research Record 2673(4):173–183, DOI: https://doi.org/10.1177/0361198119839339

    Article  Google Scholar 

  • Chen T, Carlos G (2016) XGBoost: A scalable tree boosting system. Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining, Augest 13–17, San Francisco, CA, USA

  • Cheng L, Chen X, De Vos J, Lai X, Witlox F (2019) Applying a random forest method approach to model travel mode choice behavior. Travel Behaviour and Society 14:1–10, DOI: https://doi.org/10.1016/j.tbs.2018.09.002

    Article  Google Scholar 

  • Dabiri S, Heaslip K (2018) Inferring transportation modes from GPS trajectories using a convolutional neural network. Transportation Research Part C:emerging Technologies 86:360–371, DOI: https://doi.org/10.1016/j.trc.2017.11.021

    Article  Google Scholar 

  • Das RD, Winter S (2018) A fuzzy logic based transport mode detection framework in urban environment. Journal of Intelligent Transportation Systems 22(6):478–489, DOI: https://doi.org/10.1080/15472450.2018.1436968

    Article  Google Scholar 

  • De Quintella CA, Andrade LC, Campos CA (2016) Detecting the transportation mode for context-aware systems using smartphones. Proceedings of the IEEE 19th international conference on intelligent transportation systems ITSC, November 1–4, Rio De Janero, Brazil

  • Dons E, Rojas-Rueda D, Anaya-Boig E, Avila-Palencia I, Brand C, Cole-Hunter T, de Nazelle A, Eriksson U, Gaupp-Berghausen M, Gerike R, Kahlmeier S, Laeremans M, Mueller N, Nawrot T, Nieuwenhuijsen MJ (2018) Transport mode choice and body mass index: Cross-sectional and longitudinal evidence from a European-wide study. Environment International 119:109–116, DOI: https://doi.org/10.1016/j.envint.2018.06.023

    Article  Google Scholar 

  • Efthymiou A, Barmpounakis E, Efthymiou D, Vlahogianni E (2018) Identifying transportation mode of unimodal trips using smartphone data and machine learning algorithms. Proceedings of the transportation resrach board 97th annual meeting, Janaury 7–11, Washington DC, USA

  • Elhenawy M, Rakha H (2017) Random forest/hidden Markov transportation mode recognition model using smartphone sensor data. Proceedings of the transportation resrach board 96th annual meeting, Janaury 8–12, Washington DC, USA

  • Endo Y, Toda H, Nishida K, Kawanobe A (2016) Deep feature extraction from trajectories for transportation mode estimation. Proceedings of the Pacific-Asia conference on knowledge discovery and data mining, April 19–22, Auckland, New Zealand

  • Ermagun A, Rashidi TH, Lari ZA (2015) Mode choice for school trips long-term planning and impact of modal specification on policy assessments. Transportation Research Record 2513(1):97–105, DOI: https://doi.org/10.3141/2513-12

    Article  Google Scholar 

  • Etemad M, Soares Júnior A, Matwin S (2018) Predicting transportation modes of GPS trajectories using feature engineering and noise removal. Proceedings of the Canadian conference on artificial intelligence, May 8–11, Toronto, ON, Canada

  • Etemad M, Soares A, Matwin S, Torgo L (2019) On feature selection and evaluation of transportation mode prediction strategies. arXiv preprint arXiv:1808.03096

  • Fang S, Fei Y, Xu Z, Tsao Y (2017) Learning transportation modes from smartphone sensors based on deep neural network. IEEE Sensors Journal 17(18):6111–6118, DOI: https://doi.org/10.1109/JSEN.2017.2737825

    Article  Google Scholar 

  • Fang SH, Liao HH, Fei YX, Chen KH, Huang JW, Lu YD, Tsao Y (2016) Transportation modes classification using sensors on smartphones. Sensors 16(8):1324, DOI: https://doi.org/10.3390/s16081324

    Article  Google Scholar 

  • Feng T, Timmermans HJP (2016) Comparison of advanced imputation algorithms for detection of transportation mode and activity episode using GPS data. Transportation Planning and Technology 39(2): 180–194, DOI: https://doi.org/10.1080/03081060.2015.1127540

    Article  Google Scholar 

  • Guvensan M, Dusun B, Can B, Trkmen H (2017) A novel segment-based approach for improving classification performance of transport mode detection. Sensors 18(2):87, DOI: https://doi.org/10.3390/s18010087

    Article  Google Scholar 

  • Hagenauer J, Helbich M (2017) A comparative study of machine learning classifiers for modeling travel mode choice. Expert Systems with Applications 78:273–282, DOI: https://doi.org/10.1016/j.eswa.2017.01.057

    Article  Google Scholar 

  • Irshaid H, Hasan MM, Hasan R, Oh J-S (2020) User activity and trip recognition using spatial positioning system data by integrating the geohash and gis approaches. Transportation Research Record 2675(4):391–405, DOI: https://doi.org/10.1177/0361198120980437

    Article  Google Scholar 

  • Jahangiri A, Rakha HA (2015) Applying machine learning techniques to transportation mode recognition using mobile phone sensor data. IEEE Transactions on Intelligent Transportation Systems 16(5):2406–2417, DOI: https://doi.org/10.1109/TITS.2015.2405759

    Article  Google Scholar 

  • Ji Y, Gao L, Chen D, Zhou Y, Zhang Y (2017) Functional analysis of public transport network in trip mode detection from personal smartphone trajectory data. Proceedings of the transportation resrach board 96th annual meeting, Janaury 8–12, Washington DC, USA

  • Lari A, Golroo A (2015) Automated transportation mode detection using smart phone applications via machine learning: Case study mega city of Tehran. Proceedings of the transportation resrach board 94th annual meeting, Janaury 11–15, Washington DC, USA

  • Li T, Yang Y, Wang Y, Chen C, Yao J (2016) Traffic fatalities prediction based on support vector machine. Archives of Transport 39(2):21–30, DOI: https://doi.org/10.5604/08669546.1225447

    Article  Google Scholar 

  • Liang X, Wang G (2017) A convolutional neural network for transportation mode detection based on smartphone platform. Proceedings of the IEEE 14th international conference on mobile ad hoc and sensor systems, MASS 2017, October 22–25, Orlando, FL, USA

  • Lißner S, Huber S (2021) Facing the needs for clean bicycle data — A bicycle-specific approach of GPS data processing. European Transport Research Review 13(1):1–14, DOI: https://doi.org/10.1186/s12544-020-00462-2

    Article  Google Scholar 

  • Martin BD, Addona V, Wolfson J, Adomavicius G, Fan Y (2017) Methods for real-time prediction of the mode of travel using smartphone-based GPS and accelerometer data. Sensors 17(9):1–20, DOI: https://doi.org/10.3390/s17092058

    Article  Google Scholar 

  • Nam D, Kim H, Cho J, Jayakrishnan R (2017) A model based on deep learning for predicting travel mode choice. Proceedings of the transportation resrach board 96th annual meeting, Janaury 9–13, Washington DC, USA

  • Qin Y, Luo H, Zhao F, Zhao Z, Jiang M (2018) A traffic pattern detection algorithm based on multimodal sensing. International Journal of Distributed Sensor Networks 14(6), DOI: https://doi.org/10.1177/1550147718807832

  • Rezaie M, Patterson Z, Yu J, Yazdizadeh A (2018) Travel mode detection from smartphone data: Semi-supervised vs. supervised learning. Proceedings of the transportation resrach board 97th annual meeting, Janaury 7–11, Washington DC, USA

  • Rezaie M, Patterson Z, Yu JY, Yazdizadeh A (2017) Semi-supervised travel mode detection from smartphone data. Proceedings of the third IEEE international smart cities conference ISC2, September 14–17, Wuxi, China

  • Shafique MA, Hato E (2016) Travel mode detection with varying smartphone data collection frequencies. Sensors 16(5):716, DOI: https://doi.org/10.3390/s16050716

    Article  Google Scholar 

  • Song Y, Preston J, Ogilvie D (2017) New walking and cycling infrastructure and modal shift in the UK: A quasi-experimental panel study. Transportation Research Part A: Policy and Practice 95:320–333, DOI: https://doi.org/10.1016/j.tra.2016.11.017

    Google Scholar 

  • Tambi R, Li P, Yang J (2018) An efficient CNN model for transportation mode sensing. Proceedings of the 16th ACM conference on embedded networked sensor systems, Novemeber 4–7, Shenzhen, China

  • Tang L, Xiong C, Zhang L (2015) Decision tree method for modeling travel mode switching in a dynamic behavioral process. Transportation Planning and Technology 38(8):833–850, DOI: https://doi.org/10.1080/03081060.2015.1079385

    Article  Google Scholar 

  • Wang B, Gao L, Juan Z (2018a) Travel mode detection using gps data and socioeconomic attributes based on a random forest classifier. IEEE Transactions on Intelligent Transportation Systems 19(5): 1547–1558, DOI: https://doi.org/10.1109/TITS.2017.2723523

    Article  Google Scholar 

  • Wang L, Gjoreski H, Ciliberto M, Mekki S, Valentin S, Roggen D (2019) Enabling reproducible research in sensor-based transportation mode recognition with the Sussex-Huawei dataset. IEEE Access 7:10870–10891, DOI: https://doi.org/10.1109/ACCESS.2019.2890793

    Article  Google Scholar 

  • Wang H, Luo H, Zhao F, Qin Y, Zhao Z, Chen Y (2018b) Detecting transportation modes with low-power-consumption sensors using recurrent neural network. Proceedings of the 2018 IEEE smartworld, ubiquitous intelligence & computing, advanced & trusted computing, scalable computing & communications, cloud & big data computing, internet of people and smart city innovation (SmartWorld/SCALCOM/UIC/ATC/CBDCom/IOP/SCI), October 8–12, Beijing, China

  • Wang F, Ross CL (2018) Predicting travel mode choices in the Delaware Valley Region with multinomial logit model and extreme gradient boost model. Proceedings of the transportation resrach board 97th annual meeting, Janaury 7–11, Washington DC, USA

  • Wang B, Wang Y, Qin K, Xiao Q (2018c) Detecting transportation modes based on lightGBM classifier from GPS trajectory data. 26th international conference on geoinformatics, June 28–30, Kunming, China

  • Xiao G, Cheng Q, Zhang C (2019) Detecting travel modes from smartphone-based travel surveys with continuous hidden Markov models. International Journal of Distributed Sensor Networks 15(4): 1550147719844156, DOI: https://doi.org/10.1177/1550147719844156

    Article  Google Scholar 

  • Xiao G, Juan Z, Zhang C (2015) Travel mode detection based on GPS track data and Bayesian networks. Computers, Environment and Urban Systems 54:14–22, DOI: https://doi.org/10.1016/j.compenvurbsys.2015.05.005

    Article  Google Scholar 

  • Xu Y, Clemente RD, González MC (2021) Understanding vehicular routing behavior with location-based service data. EPJ Data Science 10(1):1–7, DOI: https://doi.org/10.1140/epjds/s13688-021-00267-w

    Article  Google Scholar 

  • Xu WL, Feng X, Luo C, Li J, Ming Z (2019) Energy harvesting-based smart transportation mode detection system via attention-based LSTM. IEEE Access 7:66423–66434, DOI: https://doi.org/10.1109/ACCESS.2019.2918555

    Article  Google Scholar 

  • Yang D, Xiong C, Tang L, Zhang L (2019) Travel mode detection using smartphone gps data: A comparison between random forest and wide-and-deep learning. Proceedings of the transportation resrach board 98th annual meeting, Janaury 13–17, Washington DC, USA

  • Zhang J, Li Z, Pu Z, Xu C (2018) Comparing prediction performance for crash injury severity among various machine learning and statistical methods. IEEE Access 6:60079–60087, DOI: https://doi.org/10.1109/ACCESS.2018.2874979

    Article  Google Scholar 

  • Zhang L, Liu L, Bao S, Qiang M, Zou X (2015) Transportation mode detection based on permutation entropy and extreme learning machine. Mathematical Problems in Engineering 2015:10, DOI: https://doi.org/10.1155/2015/940624

    Google Scholar 

  • Zhou C, Jia H, Gao J, Yang L, Feng Y, Tian G (2017) Travel mode detection method based on big smartphone global positioning system tracking data. Advances in Mechanical Engineering 9(6):1–10, DOI: https://doi.org/10.1177/1687814017708134

    Google Scholar 

  • Zhou X, Yu W, Sullivan WC (2016) Making pervasive sensing possible?: Effective travel mode sensing based on smartphones. Computers, Environment and Urban Systems 58:52–59, DOI: https://doi.org/10.1016/j.compenvurbsys.2016.03.001

    Article  Google Scholar 

  • Zhu W, Ash J, Li Z, Wang Y, Lowry M (2015) Applying semi-supervised learning method for cellphone-based travel mode classification. Proceedings of the IEEE 1st international smart cities conference, ISC2, October 25–28, Guadalajara, Mexico

  • Zhu Q, Zhu M, Li M, Fu M, Huang Z, Gan Q, Zhou Z (2016) Identifying transportation modes from raw GPS data. Proceedings of the international conference of pioneering computer scientists, engineers and educators, Augest 20–22, Changsha, China

  • Zhu Q, Zhu M, Li M, Fu M, Huang Z, Gan Q, Zhou Z (2018) Transportation modes behaviour analysis based on raw GPS dataset. International Journal of Embedded Systems 10(2):126–136, DOI: https://doi.org/10.1504/IJES.2018.090569

    Article  Google Scholar 

Download references

Acknowledgments

The authors would like to thank the Transportation Research Center for Livable Communities (TRCLC) at Western Michigan University for providing their support to complete this paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Raed Abdullah Hasan.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hasan, R.A., Irshaid, H., Alhomaidat, F. et al. Transportation Mode Detection by Using Smartphones and Smartwatches with Machine Learning. KSCE J Civ Eng 26, 3578–3589 (2022). https://doi.org/10.1007/s12205-022-1281-0

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s12205-022-1281-0

Keywords

Navigation