地球信息科学学报 ›› 2022, Vol. 24 ›› Issue (2): 339-351.doi: 10.12082/dqxxkx.2022.210392

• 地球信息科学理论与方法 • 上一篇    下一篇

基于自适应时序剖分与KNN的短时交通流量预测

祁朵1(), 毛政元1,2,*()   

  1. 1.福州大学数字中国研究院(福建),福州 350108
    2.福州大学空间数据挖掘与信息共享教育部重点实验室,福州 350108
  • 收稿日期:2021-07-14 修回日期:2021-07-30 出版日期:2022-02-25 发布日期:2022-04-25
  • 通讯作者: *毛政元(1964— ),男,湖南武冈人,教授,博士生导师,主要从事城市变化检测、时空数据分析等研究。 E-mail: zymao@fzu.edu.cn
  • 作者简介:祁 朵(1995— ),男,安徽阜阳人,硕士生,主要从事智能算法、交通流预测等研究。 E-mail: qiduo1996@163.com
  • 基金资助:
    国家自然科学基金项目(41471333);福建省自然科学基金面上项目(2018J01619)

Short-term Traffic Flow Prediction based on Adaptive Time Slice and KNN

QI Duo1(), MAO Zhengyuan1,2,*()   

  1. 1. Academy of Digital China, Fuzhou University, Fuzhou 350108, China
    2. Key Laboratory of Spatial Data Mining and Information Sharing of Ministry of Education, Fuzhou University, Fuzhou 350108, China
  • Received:2021-07-14 Revised:2021-07-30 Online:2022-02-25 Published:2022-04-25
  • Supported by:
    National Natural Science Foundation of China(41471333);Project of Science and Technology of Fujian Province(2018J01619)

摘要:

在智能交通系统中,准确和高效的短时交通流量预测是交通诱导、管理和控制的前提。由于交通流量动态变化中表现出的时变性和非平稳性特征,其预测难度较大,是交通领域中亟待解决的难题。为提高短时交通流量的预测精度,本文设计与实现了基于自适应时序剖分与KNN(A-TS-KNN)的短时交通流量预测算法。① 基于动态时间规整(Dynamic Time Warping,DTW)动态剖分单日时序为不同的交通模式;② 在不同交通模式,采用互信息法求解每个预测时刻时间延迟的最大阈值,构造不同时间延迟的状态向量,生成交通流量历史数据库;③ 采用十次十折交叉验证的方法求解每个时刻不同时间延迟与不同K值的正交误差结果分布,提取误差最小的正交结果,得到自适应时间延迟与K值的参数组合;④ 采用K个最相似的近邻的距离倒数加权值作为预测结果。对比K近邻(K-nearest neighbors, KNN)、支持向量回归(Support vector regression,SVR)、长短期记忆神经网络(Long-short term memory neural network,LSTM)以及门控递归单元神经网络(Gate recurrent unit neural network,GRU)共4种主流预测模型,A-TS-KNN算法预测精度显著提升;将A-TS-KNN算法用于福州市城市路网中其他交叉路口的短时交通流量预测,结果表现出良好的泛化能力。

关键词: 短时交通流量预测, DTW, KNN, 自适应时序剖分, 互信息法, 交叉验证, 自适应时间延迟与K

Abstract:

Short-term traffic flow prediction with high accuracy and efficiency plays an important role in Intelligent Transportation Systems, which is a prerequisite for traffic guidance, management, and control. Due to the time-varying and non-stationary characteristics of the dynamic change of traffic flow, it is difficult to predict traffic flow with high accuracy, which needs to be resolved urgently in the transportation field. In order to improve the accuracy and efficiency of short-term traffic flow prediction, the paper develops a short-term traffic flow predicting algorithm based on adaptive time slice and the improved KNN model (A-TS-KNN), which is then implemented successfully in short-term traffic flow predicting experiments. In the first, the Dynamic Time Warping (DTW) algorithm is used to dynamically slice the daytime sequence of traffic flow into different traffic patterns. Secondly, the mutual information method is used to solve the maximum threshold of the time delays of traffic flow at each time in different traffic patterns. Then the traffic flow state vectors of different time delays is constructed, which generates a history database of traffic flow. Thirdly, the method of ten times ten-fold cross-validation is used to solve the orthogonal error distribution of different time delays and K values of traffic flow at each time. The orthogonal result with the smallest error is selected, and the parameters combination of adaptive time delay and K value are obtained. In the end, the weighted value of the reciprocal Euclidean distance of the K most similar neighbors is used for predicting traffic flow of next time. The forecasting accuracies of the improved A-TS-KNN and other four models including K-Nearest Neighbors (KNN) model, Support Vector Regression (SVR) model, Long-Short Term Memory (LSTM) neural networks, and Gate Recurrent Unit (GRU) neural networks are compared. The experimental results indicate that the improved A-TS-KNN model is more appropriate for short-term traffic flow forecasting than the other models. In addition, the A-TS-KNN algorithm is used for short-term traffic flow predicting at other four different intersections in the urban road network of Fuzhou, which has been shown good generalization ability.

Key words: short-term traffic flow prediction, DTW, KNN, adaptive time slice, mutual information method, cross validation, adaptive time delay and K value