RF-BiLSTM Neural Network Incorporating Attention Mechanism for Online Ride-Hailing Demand Forecasting
Abstract
:1. Introduction
- The key features required for model training are filtered by the random forest algorithm, which effectively reduces model input and improves model training efficiency while ensuring model prediction accuracy.
- Based on the historical data of online ride-hailing, an online ride-hailing demand forecasting model, namely, Att-RF-BiLSTM, was constructed, which has the best fitting effect and forecasting accuracy compared to other models.
2. Neural Network Modeling Theories
2.1. LSTM Neural Network
2.2. BiLSTM Neural Network
2.3. Attention Mechanism
3. Att-RF-BiLSTM Neural Network Model Construction
3.1. Time-Series Data Preparation
3.1.1. Data Sources and Preprocessing
3.1.2. Data Preprocessing
3.2. Att-RF-BiLSTM Online Ride-Hailing Demand Forecasting Model
3.2.1. Random Forest-Based Key Feature Selection
3.2.2. Att-RF-BiLSTM Neural Network Online Ride-Hailing Demand Forecasting Model
3.3. Model Evaluation Indicators and Parameters Selection
3.3.1. Model Evaluation Indicators
3.3.2. Model Parameters Selection
4. Experimental Analysis
4.1. Analysis of Loss Curves of the Proposed Att-RF-BiLSTM Model
4.2. Analysis of Forecasting Results
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Uber Official Website Data. Available online: https://www.uber.com/en-GB/newsroom/company-info/ (accessed on 1 December 2020).
- Clewlow, R.; Mishra, G. The Adoption, Utilization, and Impacts of Ride-Hailing in the United States; Research Report; University of California, Davis, Institute of Transportation Studies: Davis, CA, USA, 2017. [Google Scholar]
- Nourbakhshrezaei, A.; Jadidi, M.; Sohn, G. Improving Cyclists’ Safety Using Intelligent Situational Awareness System. Sustainability 2023, 15, 2866. [Google Scholar] [CrossRef]
- Bozdogan, H. Model selection and Akaike’s information criterion (AIC): The general theory and its analytical extensions. Psychometrika 1987, 52, 345–370. [Google Scholar] [CrossRef]
- Qian, X.; Ukkusuri, S.V.; Yang, C.; Yan, F. A model for short-term taxi demand forecasting accounting for spatio-temporal correlations. In Proceedings of the Transportation Research Board 96th Annual Meeting, Washington, DC, USA, 8–12 January 2017. Research Report No. 17-02470. [Google Scholar]
- Wang, D.; Cao, W.; Li, J.; Ye, J. DeepSD: Supply-demand prediction for online car-hailing services using deep neural networks. In Proceedings of the 2017 IEEE 33rd international conference on data engineering (ICDE), San Diego, CA, USA, 19–22 April 2017. [Google Scholar]
- Safikhani, A.; Kamga, C.; Mudigonda, S.; Faghih, S.S.; Moghimi, B. Spatio-temporal modeling of yellow taxi demands in New York City using generalized STAR models. Int. J. Forecast. 2020, 36, 1138–1148. [Google Scholar] [CrossRef] [Green Version]
- Li, Y.; Lu, J.; Zhang, L.; Zhao, Y. Taxi booking mobile app order demand prediction based on short-term traffic forecasting. Transp. Res. Record 2017, 2634, 57–68. [Google Scholar] [CrossRef]
- Li, X.; Pan, G.; Wu, Z.; Qi, G.; Li, S.; Zhang, D.; Zhang, W.; Wang, Z. Prediction of urban human mobility using large-scale taxi traces and its applications. Front. Comput. Sci. 2012, 6, 111–121. [Google Scholar]
- Moreira-Matias, L.; Gama, J.; Ferreira, M.; Mendes-Moreira, J.; Damas, L. Predicting taxi–passenger demand using streaming data. IEEE Trans. Intell. Transp. Syst. 2013, 14, 1393–1402. [Google Scholar] [CrossRef] [Green Version]
- Predict New York City Taxi Demand|NYC Data Science Academy Blog. Available online: https://nycdatascience.com/blog/student-works/predict-new-york-city-taxi-demand/ (accessed on 21 July 2018).
- Faghih, S.S.; Safikhani, A.; Moghimi, B.; Kamga, C. Predicting short-term Uber demand using spatio-temporal modeling: A New York City Case Study. arXiv 2017, arXiv:1712.02001. [Google Scholar]
- Liu, J.; Cui, E.; Hu, H.; Chen, X.; Chen, X.; Chen, F. Short-term forecasting of emerging on-demand ride services. In Proceedings of the 2017 4th International Conference on Transportation Information and Safety (ICTIS), Banff, AB, Canada, 8–10 August 2017; pp. 489–495. [Google Scholar]
- Chang, W.; Li, R.; Fu, Y.; Xiao, Y.; Zhou, S. A multistep forecasting method for online car-hailing demand based on wavelet decomposition and deep Gaussian process regression. J. Supercomput. 2022, 79, 3412–3436. [Google Scholar] [CrossRef]
- Xu, J.; Rahmatizadeh, R.; Bölöni, L.; Turgut, D. Real-time prediction of taxi demand using recurrent neural networks. IEEE Trans. Intell. Transp. Syst. 2017, 19, 2572–2581. [Google Scholar] [CrossRef]
- Chen, L.; Thakuriah, P.V.; Ampountolas, K. Short-term prediction of demand for ride-hailing services: A deep learning approach. J. Big Data Anal. Transp. 2021, 3, 175–195. [Google Scholar] [CrossRef]
- Ara, Z.; Hashemi, M. Ride hailing service demand forecast by integrating convolutional and recurrent neural networks. In Proceedings of the 33rd International Conference on Software Engineering and Knowledge Engineering, Pittsburgh, PA, USA, 1–10 July 2021. [Google Scholar]
- Ye, X.; Ye, Q.; Yan, X.; Wang, T.; Chen, J.; Li, S. Demand Forecasting of Online Car-Hailing with Combining LSTM+ Attention Approaches. Electronics 2021, 10, 2480. [Google Scholar] [CrossRef]
- Liang, Y.; Huang, G.; Zhao, Z. Joint demand prediction for multimodal systems: A multi-task multi-relational spatiotemporal graph neural network approach. Transp. Res. Part C Emerg. Technol. 2022, 140, 103731. [Google Scholar] [CrossRef]
- Wu, Y.; Zhang, H.; Li, C.; Tao, S.; Yang, F. Urban ride-hailing demand prediction with multi-view information fusion deep learning framework. Appl. Intell. 2022, 1–19. [Google Scholar] [CrossRef]
- Ara, Z.; Hashemi, M. Predicting Ride Hailing Service Demand Using Autoencoder and Convolutional Neural Network. Int. J. Softw. Eng. Knowl. Eng. 2022, 32, 109–129. [Google Scholar] [CrossRef]
- Liu, K.; Chen, Z.; Yamamoto, T.; Tuo, L. Exploring the impact of spatiotemporal granularity on the demand prediction of dynamic ride-hailing. IEEE Trans. Intell. Transp. Syst. 2022, 24, 104–114. [Google Scholar] [CrossRef]
- Huang, Z.; Zhang, W.; Wang, D.; Yin, Y. A GAN framework-based dynamic multi-graph convolutional network for origin–destination-based ride-hailing demand prediction. Inf. Sci. 2022, 601, 129–146. [Google Scholar] [CrossRef]
- Zhang, D.; Xiao, F.; Kou, G.; Luo, J.; Yang, F. Learning Spatial-Temporal Features of Ride-Hailing Services with Fusion Convolutional Networks. J. Adv. Transp. 2023, 2023, 4427638. [Google Scholar] [CrossRef]
- Li, S.; Yang, H.; Cheng, R.; Ge, H. Hybrid deep learning models for short-term demand forecasting of online car-hailing considering multiple factors. Transp. Lett. 2023, 1–16. [Google Scholar] [CrossRef]
- Abd El-Karim, M.S.B.A.; Mosa El Nawawy, O.A.; Abdel-Alim, A.M. Identification and assessment of risk factors affecting construction projects. HBRC J. 2017, 13, 202–216. [Google Scholar] [CrossRef] [Green Version]
- Ma, X.; Tao, Z.; Wang, Y.; Yu, H.; Wang, Y. Long short-term memory neural network for traffic speed prediction using remote microwave sensor data. Transp. Res. Pt. C-Emerg. Technol. 2015, 54, 187–197. [Google Scholar] [CrossRef]
- Graves, A.; Schmidhuber, J. Framewise phoneme classification with bidirectional LSTM and other neural network architectures. Neural Netw. 2005, 18, 602–610. [Google Scholar] [CrossRef] [PubMed]
- Chen, D.; Zhang, J.; Jiang, S. Forecasting the short-term metro ridership with seasonal and trend decomposition using loess and LSTM neural networks. IEEE Access 2020, 8, 91181–91187. [Google Scholar] [CrossRef]
- Zhao, G.; Jiang, P.; Lin, T. Remaining Life Prediction of Rolling Bearing Based on CNN-BiLSTM Model with Attention Mechanism. J. Mech. Electr. Eng. 2021, 38, 1253–1260. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J.R. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Mahato, N.K.; Dong, J.; Song, C.; Chen, Z.; Wang, N.; Ma, H.; Gong, G. Electric Power System Transient Stability Assessment Based on Bi-LSTM Attention Mechanism. In Proceedings of the 2021 6th Asia Conference on Power and Electrical Engineering (ACPEE), Chongqing, China, 8–11 April 2021. [Google Scholar]
- Ward, J.H., Jr. Hierarchical grouping to optimize an objective function. J. Am. Stat. Assoc. 1963, 58, 236–244. [Google Scholar] [CrossRef]
- Yu, T.; Pei, L.; Li, W.; Sun, Z.Y.; Huyan, J. Prediction of Pavement Surface Condition Index Based on Random Forest Algorithm. J. Highw. Transp. Res. Dev. 2021, 38, 16–23. [Google Scholar] [CrossRef]
- Sylvester, E.V.; Bentzen, P.; Bradbury, I.R.; Clément, M.; Pearce, J.; Horne, J.; Beiko, R.G. Applications of random forest feature selection for fine-scale genetic population assignment. Evol. Appl. 2018, 11, 153–165. [Google Scholar] [CrossRef]
- Wen, H.; Zhang, D. Highway traffic volume prediction based on Bi-LSTM model. Highw. Eng. 2019, 44, 51–56. [Google Scholar]
- Prabha, A.; Yadav, J.; Rani, A.; Singh, V. Design of intelligent diabetes mellitus detection system using hybrid feature selection based XGBoost classifier. Comput. Biol. Med. 2021, 136, 104664. [Google Scholar] [CrossRef]
No | Pickup_dt | Borough | Spd | Vsb | Temp | Dewp | Slp | Pcp01 | Pcp06 | Pcp24 | Sd | Hday | Pickups |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 2015-1-1 1:00 | Bronx | 5 | 10 | 30 | 7 | 1023.5 | 0 | 0 | 0 | 0 | 1 | 152 |
2 | 2015-1-1 1:00 | Brooklyn | 5 | 10 | 30 | 7 | 1023.5 | 0 | 0 | 0 | 0 | 1 | 1519 |
3 | 2015-1-1 1:00 | EWR | 5 | 10 | 30 | 7 | 1023.5 | 0 | 0 | 0 | 0 | 1 | 0 |
4 | 2015-1-1 1:00 | Manhattan | 5 | 10 | 30 | 7 | 1023.5 | 0 | 0 | 0 | 0 | 1 | 5258 |
5 | 2015-1-1 1:00 | Queens | 5 | 10 | 30 | 7 | 1023.5 | 0 | 0 | 0 | 0 | 1 | 405 |
6 | 2015-1-1 1:00 | Staten Island | 5 | 10 | 30 | 7 | 1023.5 | 0 | 0 | 0 | 0 | 1 | 6 |
7 | 2015-1-1 1:00 | NA | 5 | 10 | 30 | 7 | 1023.5 | 0 | 0 | 0 | 0 | 1 | 4 |
Pickup_dt | Spd | Vsb | Temp | Dewp | Slp | Pcp01 | Pcp06 | Pcp24 | Sd | Hday | Pickups |
---|---|---|---|---|---|---|---|---|---|---|---|
2015-1-1 1:00 | 5 | 10 | 30 | 7 | 1023.5 | 0 | 0 | 0 | 0 | 1 | 7344 |
2015-1-1 2:00 | 3 | 10 | 30 | 6 | 1023 | 0 | 0 | 0 | 0 | 1 | 6043 |
2015-1-1 3:00 | 5 | 10 | 30 | 8 | 1022.3 | 0 | 0 | 0 | 0 | 1 | 6763 |
2015-1-1 4:00 | 5 | 10 | 29 | 9 | 1022 | 0 | 0 | 0 | 0 | 1 | 4872 |
2015-1-1 5:00 | 5 | 10 | 28 | 9 | 1021.8 | 0 | 0 | 0 | 0 | 1 | 2406 |
Dropout Value | MAE | |
---|---|---|
Training Set | Test Set | |
0.9 | 0.0238 | 0.0324 |
0.5 | 0.0217 | 0.0303 |
0.1 | 0.0212 | 0.0295 |
0.01 | 0.0196 | 0.0284 |
Forecasting Models | Att-RF-BiLSTM | Att-XGBoost-BiLSTM | |
---|---|---|---|
Evaluation Indicators | |||
MAE | 0.0283 | 0.0306 | |
MSE | 0.0015 | 0.0018 |
Forecasting Models | Att-RF-BiLSTM | Att-BiLSTM | LSTM | |
---|---|---|---|---|
Evaluation Indicators | ||||
MAE | 0.0283 | 0.0318 | 0.0346 | |
MSE | 0.0015 | 0.0021 | 0.0025 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhao, X.; Sun, K.; Gong, S.; Wu, X. RF-BiLSTM Neural Network Incorporating Attention Mechanism for Online Ride-Hailing Demand Forecasting. Symmetry 2023, 15, 670. https://doi.org/10.3390/sym15030670
Zhao X, Sun K, Gong S, Wu X. RF-BiLSTM Neural Network Incorporating Attention Mechanism for Online Ride-Hailing Demand Forecasting. Symmetry. 2023; 15(3):670. https://doi.org/10.3390/sym15030670
Chicago/Turabian StyleZhao, Xiangmo, Kang Sun, Siyuan Gong, and Xia Wu. 2023. "RF-BiLSTM Neural Network Incorporating Attention Mechanism for Online Ride-Hailing Demand Forecasting" Symmetry 15, no. 3: 670. https://doi.org/10.3390/sym15030670
APA StyleZhao, X., Sun, K., Gong, S., & Wu, X. (2023). RF-BiLSTM Neural Network Incorporating Attention Mechanism for Online Ride-Hailing Demand Forecasting. Symmetry, 15(3), 670. https://doi.org/10.3390/sym15030670