Predicting the Demand of Ride-Hailing Based on a QRF-SA-ConvLSTM Model
-
摘要: 网约车需求预测中考虑时空特征和不确定性影响对于提升交通系统的效率和稳定性至关重要。研究了融合分位数回归森林(quantile regression forest, QRF)和自注意力卷积长短期记忆网络(self-attention convolutional long short-term memory, SA-ConvLSTM)的预测模型,通过协同优化时空特征学习与概率分布建模,实现高精度需求预测与不确定性估计。首先,模型利用分位数回归森林生成指定概率区间的需求预测分布,并结合注意力机制对原始数据加权融合,构建时空概率矩阵;随后将该矩阵输入SA-ConvLSTM模块,由卷积结构提取局部空间模式,自注意力机制聚焦关键时空节点,LSTM捕捉长期时间依赖;最终通过多任务输出层同步优化点预测与区间估计。该方法同时结合了分位数回归的分布建模能力与深度学习的时空特征提取优势,进而提升预测精度和不确定性量化能力。研究采用滴滴开源的西安市二环内网约车轨迹数据集验证模型的有效性和准确性。结果表明:均值预测中,提出模型的平均绝对误差和均方误差分别较SA-ConvLSTM模型降低了21%和17.2%;不确定性估计中,提出模型在95%置信度下的区间覆盖率相对于线性分位数回归(linear quantile regression,LQR)、QRF和SA-ConvLSTM模型分别提高了5.3%、2.5%、0.9%,同时区间平均宽度分别减少了41.5%、30%、18.5%。以上结论验证了模型的预测精度和可靠性。
-
关键词:
- 智能交通 /
- 网约车需求预测 /
- QRF-SA-ConvLSTM /
- 不确定性估计
Abstract: Considering the spatiotemporal features and predictive uncertainty in the demand prediction of ride-hailing are essential for improving the efficiency and robustness of the transportation system. This study proposes a novel prediction framework that integrates quantile regression forests (QRF) and a self-attention convolutional long short-term memory network (SA-ConvLSTM) to jointly optimize spatiotemporal feature learning and probabilistic modeling, which could lead to high-precision prediction and uncertainty estimation. First, the model employs QRF to generate the distributions of predicted demand within specified probability intervals from historical spatiotemporal data. It then establishes a spatiotemporal probability matrix by weighted fusion of original data through the attention mechanism. The matrix is then fed into the SA-ConvLSTM module, where the convolutional structure extracts local spatial patterns, the self-attention mechanism focuses on key spatiotemporal nodes, and LSTM captures long-term temporal dependencies. Finally, a multi-task output layer simultaneously optimizes point predictions and interval estimations. Combining the ability of distributional modeling of QRF and the advantage of extraction of spatiotemporal feature of deep learning, the proposed model improves both prediction accuracy and uncertainty estimation. The study validates the model's effectiveness and accuracy using Didi's open-source dataset of ride-hailing trajectories within the second ring road in Xi'an. The results show that in terms of mean prediction, the proposed model reduces mean absolute error and mean squared error by 21% and 17.2%, respectively, comparing to the SA-ConvLSTM baseline; in terms of uncertainty estimation, the prediction interval coverage probability at 95% confident level improves by 5.3%, 2.5%, and 0.9% comparing to linear quantile regression (LQR), QRF, and SA-ConvLSTM, respectively, while the average width of the prediction results is reduced by 41.5%, 30%, and 18.5%. These results validate the proposed model's goodness of fit in terms of both predictive accuracy and reliability. -
表 1 各模型预测评估指标
Table 1. The predictive evaluation indicators of each model
模型 评价指标 MAE RMSE LQR 12.04 16.82 QRF 10.05 13.16 SA-ConvLSTM 8.27 10.58 QRF-SA-ConvLSTM 6.53 8.76 表 2 各模型不确定估计性能对比
Table 2. Comparison of uncertainty estimation performance among different models
模型 评价指标 PICP(90%) PINAW(90%) PICP(90%) PINAW(90%) LQR 0.860 0.251 0.890 0.287 QRF 0.873 0.216 0.916 0.240 SA-ConvLSTM 0.880 0.182 0.931 0.206 QRF-SA-ConvLSTM 0.892 0.152 0.940 0.168 -
[1] 张政, 陈艳艳, 梁天闻. 基于网约车数据的城市区域出行时空特征识别与预测研究[J]. 交通运输系统工程与信息, 2020, 20(3): 89-94.ZHANG Z, CHEN Y Y, LIANG T W. Research on identification and prediction of spatial-temporal characteristics of urban regional travel based on ride-hailing data[J]. Journal of Transportation Systems Engineering and Information Technology, 2020, 20(3): 89-94. (in Chinese) [2] 席殷飞, 刘钟锴, 杨佩云, 等. 网约车出行需求预测方法[J]. 上海大学学报(自然科学版), 2020, 26(3): 328-341.XI Y F, LIU Z K, YANG P Y, et al. Ride-hailing travel demand forecasting methods[J]. Journal of Shanghai University (Natural Science Edition), 2020, 26(3): 328-341. (in Chinese) [3] 王迪, 李颖, 胡宇娇, 等. 基于机器学习的网约车拼车需求预测研究[J]. 汽车安全与节能学报, 2024, 15(5): 723-731.WANG D, LI Y, HU J Y, et al. Research on carpooling demand prediction study based on machine learning[J]. Journal of Automotive Safety and Energy, 2024, 15(5): 723-731. (in Chinese) [4] 李之红, 申天宇, 文琰杰, 等. 基于混合机器学习框架的网约车订单需求预测与异常点识别[J]. 交通信息与安全, 2023, 41 (3): 157-165, 174. doi: 10.3963/j.jssn.1674-4861.2023.03.017LI Z H, SHEN T Y, WEN Y J, et al. Prediction of ride-hailing demand and identification of anomalies based on hybrid machine learning framework[J]. Journal of Transport Information and Safety, 2023, 41(3): 157-165, 174. (in Chinese) doi: 10.3963/j.jssn.1674-4861.2023.03.017 [5] KIM T, SHARDA S, ZHOU X S, et al. A stepwise interpretable machine learning framework using linear regression (LR)and long short-term memory(LSTM): city-wide demand-side prediction of yellow taxi and for-hire vehicle (FHV)service[J]. Transportation Research Part C: Emerging Technologies, 2020, 120: 102786. doi: 10.1016/j.trc.2020.102786 [6] XU J, RAHMATIZADEH R, BOLONI L, et al. Real-time prediction of taxi demand using recurrent neural networks[J]. IEEE Transactions on Intelligent Transportation Systems, 2017, 19(8): 2572-2581. [7] LIPPI M, BERTINI M, FRASCONI P. An experimental comparison of time-series analysis and supervised learning[J]. IEEE Transactions on Intelligent Transportation Systems, 2013, 14(2): 871-882. doi: 10.1109/TITS.2013.2247040 [8] 黄昕, 毛政元. 基于时空多图卷积网络的网约车乘客需求预测[J]. 地球信息科学学报, 2023, 25(2): 311-323.HUANG X, MAO Z Y. Prediction of ride-hailing passenger demand based on spatio-temporal multi-graph convolutional networks[J]. Journal of Geo-Information Science, 2023, 25(2): 311-323(in Chinese). [9] 那绪博, 张莹, 李沐阳, 等. 基于ODCG的网约车需求预测模型[J]. 山东大学学报(工学版), 2023, 53(5): 48-56.NA X B, ZHANG Y, LI M Y, et al. An online car-hailing demand forecasting model based on ODCG[J]. Journal of Shandong University(Engineering Science), 2023, 53(5): 48-56. (in Chinese) [10] 高宇星, 宗威, 胡凯, 等. 基于CNN-ATTBiLSTM网约车需求短时预测[J]. 运筹与管理, 2024, 33(11): 211-217.GAO Y X, ZONG W, HU K, et al. Short-term demand forecasting for online car-hailing based on CNN-ATTBiLSTM networks[J]. Operations Research and Management Science, 2024, 33(11): 211-217. (in Chinese) [11] LIN Z H, LI M M, ZHENG Z B, et al. Self-attention convl-stm for spatiotemporal prediction[C]. 34th AAAI Conference on Artificial Intelligence, New York: AAAI, 2020. [12] RODRIGUES F, PEREIRA F C. Beyond expectation: deep joint mean and quantile regression for spatiotemporal problems[J]. IEEE Transactions on Neural Networks and Learning Systems, 2020(12): 1-13. [13] GAWLIKOWSKI J, TASSI R N, ALI M, et al. A survey of uncertainty in deep neural networks[J]. Artificial Intelligence Review, 2023, 56: 1513-1589. doi: 10.1007/s10462-023-10562-9 [14] WU D, GAO L, CHINAZZI M, et al. Quantifying uncertainty in deep spatiotemporal forecasting[C]. 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, Singapore: ACM, 2021. [15] GUO J H, WILLIAMS B M. Real-time short-term traffic speed level forecasting and uncertainty quantification using layered Kalman filters[J]. Transportation Research Record, 2010, 2175(1): 28-37. doi: 10.3141/2175-04 [16] LIU Y, LIU Z, LI X G, et al. Dynamic traffic demand uncertainty prediction using radio-frequency identification data and link volume data[J]. IET Intelligent Transport Systems, 2019, 13(8): 1309-1317. doi: 10.1049/iet-its.2018.5317 [17] CHEN Q X, LV B, HAO B B, et al. Modelling multiple quantiles together with the mean based on SA-ConvLSTM for taxi pick-up prediction[J]. IET Intelligent Transport Systems, 2022, 16(11): 1623-1632. doi: 10.1049/itr2.12238 [18] LIU G, WANG Y, QIN H, et al. Probabilistic spatiotemporal forecasting of wind speed based on multi-network deep ensembles method[J]. Renewable Energy, 2023, 209: 231-247. doi: 10.1016/j.renene.2023.03.094 [19] MALLICK T, MACFARLANE J, BALAPRAKASH P. Uncertainty quantification for traffic forecasting using deep-ensemble-based spatiotemporal graph neural networks[J]. IEEE Transactions on Intelligent Transportation Systems, 2024, 25(8): 9141-9152. doi: 10.1109/TITS.2024.3381099 [20] KHAN N, SHAHID S, JUNENG L, et al. Prediction of heat waves in Pakistan using quantile regression forests[J]. Atmospheric research, 2019, 221: 1-11. doi: 10.1016/j.atmosres.2019.01.024 [21] 韩印, 李媛媛, 李文翔, 等. 基于轨迹数据的网约车排放时空特征分析[J]. 交通运输系统工程与信息, 2022, 22(1): 234-242.HAN Y, LI Y Y, LI W X, et al. Analyzing spatiotemporal characteristics of ridesourcing emissions based on trajectory data[J]. Journal of Transportation Systems Engineering and Information Technology, 2022, 22(1): 234-242. (in Chinese) -