Publications-Theses

Article View/Open

Publication Export

Google ScholarTM

NCCU Library

Citation Infomation

Related Publications in TAIR

題名 LSTM及GRU模型用於預測市區交通流量之研究
A Study of Traffic Flow Prediction Using LSTM and GRU
作者 陳哲安
Chen, Che-An
貢獻者 張宏慶
Jang, Hung-Chin
陳哲安
Chen, Che-An
關鍵詞 交通流量預測
深度學習
LSTM記憶單元
GRU控制單元
Traffic Flow Prediction
Deep Learning
LSTM
GRU
日期 2019
上傳時間 3-Oct-2019 17:18:20 (UTC+8)
摘要 近年來,隨著各縣市智慧城市的推廣,如何改善交通混亂的議題一直受到大眾關注。若我們能有效預測交通流量,政府單位即可事先做好相關配套措施,有效舒緩交通擁塞的問題。在傳統上大多會使用ARIMA (Autoregressive Integrated Moving Average model)方法來預測交通流量,但隨著深度學習在其他領域有著突破性的發展,LSTM (Long Short-Term Memory)和GRU (Gated recurrent units)模型已被證實對於交通流量預測有良好的效益。
對於交通流量的資料收集,本研究將撰寫程式收集「常態性交通流量資料」與「可預期之偶發性活動資料」。關於「常態性交通流量資料」,我們將使用臺北市政府資料開放平台的「車輛偵測器(VD)資料」作為資料來源。因為市區交通的狀況較為複雜,容易受到觀光盛會、演唱會、天氣等「可預期之偶發性活動」影響,本研究採用本團隊先前的研究成果[8],透過撰寫爬蟲程式對於多個售票網站、旅遊觀光網站、中央氣象局進行資料收集。本研究將上述資料輸入至 LSTM和GRU 模型以對其進行訓練,並利用Adam Optimizer 對模型進行優化。LSTM和GRU 模型之實作,以 Google 開發之機器學習框架 TensorFlow進行。最後,我們以平均絕對誤差(Mean Absolute Error, MAE)、均方誤差(Mean Square Error, MSE)和平均絕對百分比誤差(Mean Absolute Percentage Error, MAPE)對模型之預測準確率進行評估,進而分析LSTM模型和GRU模型在市區交通流量預測之準確度及LSTM和GRU模型之效益。
In recent years, with the promotion of smart cities in each county, the issue of how to resolve the problem of traffic chaos has drawn much attention. If we can accurately predict the traffic flow, then we can alleviate the traffic congestion more effectively. ARIMA (Autoregressive Integrated Moving Average model) were used to predict traffic flow. As the deep learning method has a breakthrough in many other fields, more and more studies propose to use deep learning models to solve real-world problems, and the results approve that both LSTM (Long Short-Term Memory) and GRU (Gated Recurrent Units) models have excellent performance in traffic flow prediction.
The proposed method is going to use both "normal traffic flow data" and "predictable sporadic activity data." As to the "normal traffic flow data," we use the "Vehicle Detector (VD) Data" given by the Taipei City Government Information Open Platform. On the other side, the traffic is also vulnerable to predictable sporadic activities, such as citywide carnival and festival, large-scale concerts, weather, etc. At this part, we code web crawler for websites of the ticket office, tourist information, news information, Central Weather Bureau, etc. These training data is fed into the LSTM and GRU deep learning models. We then use Adam Optimizer to optimize the models. The implementations of both LSTM and GRU models are based on TensorFlow of Google. Finally, we use MAE (Mean Absolute Error) and MAPE (Mean Absolute Percentage Error) to evaluate the urban traffic flow prediction accuracy of both LSTM and GRU models.
參考文獻 1. M. S. Ahmed and A. R. Cook, “Analysis of Freeway Traffic Time-Series Data by Using Box–Jenkins Techniques,” Transp. Res. Rec., no. 722, pp. 1–9, 1979.
2. Usman Ali and Tariq Mahmood, “Using Deep Learning to Predict Short Term Traffic Flow: A Systematic Literature Review,” Part of the Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering book series(LNICST, volume 222), Jul. 2018.
3. Yuan-Yuan Chen, Yisheng Lv, Zhenjiang Li, and Fei-Yue Wang, “Long Short-Term Memory Model for Traffic Congestion Prediction with Online Open Data,” IEEE 19th International Conference on Intelligent Transportation System, 2016.
4. Xunsheng Du, Huaqing Zhang, Hien Van Nguyen and Zhu Han, “Stacked LSTM Deep Learning Model for Traffic Prediction in Vehicle-to-Vehicle Communication,” 2017 IEEE 86th Vehicular Technology Conference (VTC-Fall), Toronto, ON, Canada, Sept. 24-27, 2017.
5. Rui Fu, Zuo Zhang, Li Li, “Using LSTM and GRU Neural Network Methods for Traffic Flow Prediction,” Chinese Association of Automation(YAC), Youth Academic Annual Conference of, January 2017.
6. Yarin Gal and Zoubin Ghahramani, “A Theoretically Grounded Application of Dropout in Recurrent Neural Networks,” arXiv preprint arXiv:1512.05297v5 2016.
7. Hung-Chin Jang and Ting-Kuan Lin, "Traffic-Aware Traffic Signal Control Framework Based on SDN and Cloud-Fog Computing," 2018 IEEE 88th Vehicular Technology Conference (VTC 2018-Fall), Chicago, USA, Aug. 27 - 30, 2018.
8. Hung-Chin Jang and Yu-Hsiang Chang, "Traffic Flow Forecast for Traffic with Forecastable Sporadic Events," The 12th International Conference on Ubi-Media Computing (Ubi-Media 2019), Bali, Indonesia, Aug. 6-9, 2019.
9. A. Krizhevsky, I. Sutskever and G. E. Hinton, “ImageNet Classification with Deep Convolutional Neural Networks,” NIPS’12 Proceedings of the 25th International Conference on Neural Information Processing Systems, vol 1, pp. 1097-1105, Dec. 2012.
10. Danqing Kang, Yisheng Lv and Yuan-Yuan Chen, “Short-term Traffic Flow Prediction with LSTM Recurrent Neural Network,” 2017 IEEE 20th International Conference on Intelligent Transportation Systems (ITSC), Mar. 2018.
11. Diederik Kingma and Jimmy Ba, “Adam: A Method for Stochastic Optimization,” arXiv preprint arXiv:1412.6980v8, 2015.
12. S. Lee and D. Fambro, “Application of Subset Autoregressive Integrated Moving Average Model for Short-Term Freeway Traffic Volume Forecasting,” Transport. Res. Record, 1999, 1678, pp. 179–188.
13. Yipeng Liu, Haifeng Zheng, Xinxin Feng and Zhonghui Chen, “Short-Term Traffic Flow Prediction with Conv-LSTM,” 2017 9th International Conference on Wireless Communications and Signal Processing (WCSP), Dec. 2017.
14. Yangdong Liu, Yizhe Wang, Xiaoguang Yang and Linan Zhang, “Short-term Travel Time Prediction by Deep Learning: A Comparison of Different LSTM-DNN Models,” 2017 IEEE 20th International Conference on Intelligent Transportation Systems (ITSC), Mar. 2018.
15. Colin David Lewis, “Industrial and Business Forecasting Methods: A Practical Guide to Exponential Smoothing and Curve Fitting,” Published: London , Butterworth Scientific, 1982.
16. X. Ma, Z. Tao, Y. Wang, H. Yu and Y. Wang, “Long Short-Term Memory Neural Network for Traffic Speed Prediction Using Remote Microwave Sensor Data,” Transp. Res. C, Emerg. Technol., vol. 54, pp. 187-197, May 2015.
17. Tom Mitchell, “Machine Learning,” Boston, Mass. : McGraw-Hill, 1997.
18. Hongxin Shao and Boon-Hee Soong, “Traffic Flow Prediction with Long Short-Term Memory Networks (LSTMs),” 2016 IEEE Region 10 Conference (TENCON), 2016.
19. Ridha Soua, Arief Koesdwiady and Fakhri Karray, “Big-Data-Generated Traffic Flow Prediction Using Deep Learning and Dempster-Shafer Thseory,” in 2016 IEEE IJCNN, pp. 3195-3202, 2016.
20. Y. Tian and L. Pan, “Predicting Short-Term Traffic Flow by Long Short-Term Memory Recurrent Neural Network,” in 2015 IEEE International Conference on Smart City, Chengdu, pp. 153-158, 2015.
21. M. Van Der Voort, M. Dougherty and S. Watson, “Combining Kohonen Maps with ARIMA Time Series Models to Forecast Traffic Flow,” Transport. Res. C: Emerging Technol., 1996, 4, (5), pp. 307–318.
22. B. M. Williams and L. A. Hoel, “Modeling and Forecasting Vehicular Traffic Flow as a Seasonal ARIMA Process: Theoretical Basis and Empirical Results,” J. Transp. Eng., vol. 129, no. 6, pp. 664–672, 2003.
23. Da Zhang and Mansur R. Kabuba, “Combining Weather Condition Data to Predict Traffic Flow: A GRU Based Deep Learning Approach,” 2017 IEEE 15th Intl Conf on Dependable, Autonomic and Secure Computing, 15th Intl Conf on Pervasive Intelligence and Computing, 3rd Intl Conf on Big Data Intelligence and Computing and Cyber Science and Technology Congress(DASC/PiCom/DataCom/CyberSciTech), Apr. 2017.
24. Zheng Zhao, Weihai Chen, Xingming Wu, Peter C. Y. Chen, Jingmeng Liu, “LSTM Network: A Deep Learning Approach for Short-Term Traffic Forecast,” IET Intelligent Transport Systems , vol. 11 , Issue: 2 , Mar. 2017.
25. IBM Smart Cities, http://www-07.ibm.com/tw/dp-cs/smartercity/overview.html, retrieved date Oct. 6, 2018.
26. Nvidia人工智慧、機器學習、深度學習, https://blogs.nvidia.com.tw/2016/07/whats-difference-artificial-intelligence-machine-learning-deep-learning-ai, retrieved Oct 6, 2018.
27. 臺北智慧城市推動主軸, https://drive.google.com/file/d/1FZvBks9UJEh5c3SxtDRfL6Tnhqy6Lrmg/view, retrieved data Oct. 6, 2018.
描述 碩士
國立政治大學
資訊科學系
106753014
資料來源 http://thesis.lib.nccu.edu.tw/record/#G0106753014
資料類型 thesis
dc.contributor.advisor 張宏慶zh_TW
dc.contributor.advisor Jang, Hung-Chinen_US
dc.contributor.author (Authors) 陳哲安zh_TW
dc.contributor.author (Authors) Chen, Che-Anen_US
dc.creator (作者) 陳哲安zh_TW
dc.creator (作者) Chen, Che-Anen_US
dc.date (日期) 2019en_US
dc.date.accessioned 3-Oct-2019 17:18:20 (UTC+8)-
dc.date.available 3-Oct-2019 17:18:20 (UTC+8)-
dc.date.issued (上傳時間) 3-Oct-2019 17:18:20 (UTC+8)-
dc.identifier (Other Identifiers) G0106753014en_US
dc.identifier.uri (URI) http://nccur.lib.nccu.edu.tw/handle/140.119/126583-
dc.description (描述) 碩士zh_TW
dc.description (描述) 國立政治大學zh_TW
dc.description (描述) 資訊科學系zh_TW
dc.description (描述) 106753014zh_TW
dc.description.abstract (摘要) 近年來,隨著各縣市智慧城市的推廣,如何改善交通混亂的議題一直受到大眾關注。若我們能有效預測交通流量,政府單位即可事先做好相關配套措施,有效舒緩交通擁塞的問題。在傳統上大多會使用ARIMA (Autoregressive Integrated Moving Average model)方法來預測交通流量,但隨著深度學習在其他領域有著突破性的發展,LSTM (Long Short-Term Memory)和GRU (Gated recurrent units)模型已被證實對於交通流量預測有良好的效益。
對於交通流量的資料收集,本研究將撰寫程式收集「常態性交通流量資料」與「可預期之偶發性活動資料」。關於「常態性交通流量資料」,我們將使用臺北市政府資料開放平台的「車輛偵測器(VD)資料」作為資料來源。因為市區交通的狀況較為複雜,容易受到觀光盛會、演唱會、天氣等「可預期之偶發性活動」影響,本研究採用本團隊先前的研究成果[8],透過撰寫爬蟲程式對於多個售票網站、旅遊觀光網站、中央氣象局進行資料收集。本研究將上述資料輸入至 LSTM和GRU 模型以對其進行訓練,並利用Adam Optimizer 對模型進行優化。LSTM和GRU 模型之實作,以 Google 開發之機器學習框架 TensorFlow進行。最後,我們以平均絕對誤差(Mean Absolute Error, MAE)、均方誤差(Mean Square Error, MSE)和平均絕對百分比誤差(Mean Absolute Percentage Error, MAPE)對模型之預測準確率進行評估,進而分析LSTM模型和GRU模型在市區交通流量預測之準確度及LSTM和GRU模型之效益。
zh_TW
dc.description.abstract (摘要) In recent years, with the promotion of smart cities in each county, the issue of how to resolve the problem of traffic chaos has drawn much attention. If we can accurately predict the traffic flow, then we can alleviate the traffic congestion more effectively. ARIMA (Autoregressive Integrated Moving Average model) were used to predict traffic flow. As the deep learning method has a breakthrough in many other fields, more and more studies propose to use deep learning models to solve real-world problems, and the results approve that both LSTM (Long Short-Term Memory) and GRU (Gated Recurrent Units) models have excellent performance in traffic flow prediction.
The proposed method is going to use both "normal traffic flow data" and "predictable sporadic activity data." As to the "normal traffic flow data," we use the "Vehicle Detector (VD) Data" given by the Taipei City Government Information Open Platform. On the other side, the traffic is also vulnerable to predictable sporadic activities, such as citywide carnival and festival, large-scale concerts, weather, etc. At this part, we code web crawler for websites of the ticket office, tourist information, news information, Central Weather Bureau, etc. These training data is fed into the LSTM and GRU deep learning models. We then use Adam Optimizer to optimize the models. The implementations of both LSTM and GRU models are based on TensorFlow of Google. Finally, we use MAE (Mean Absolute Error) and MAPE (Mean Absolute Percentage Error) to evaluate the urban traffic flow prediction accuracy of both LSTM and GRU models.
en_US
dc.description.tableofcontents 第一章 緒論 1
1.1 背景簡介 1
1.1.1 Smart Cities 1
1.1.2 資料收集與處理 2
1.1.2.1 網路爬蟲 2
1.1.2.2 資料前處理 3
1.1.3 機器學習與深度學習 4
1.1.3.1 機器學習(Machine Learning) 5
1.1.3.2 深度學習(Deep Learning)和RNN(Recurrent Neural Networks) 5
1.1.3.3 LSTM(Long Short-Term Memory) 6
1.1.3.4 GRU(Gated Recurrent Unit) 8
1.2 研究背景與動機 10
1.3 論文架構 12

第二章 相關研究 13
2.1 Traffic Flow Prediction with Long Short-Term Memory Networks (LSTMs) [18] 13
2.2 Long Short-Term Memory Model for Traffic Congestion Prediction with Online Open Data [3] 14
2.3 Using LSTM and GRU Neural Network Methods for Traffic Flow Prediction [5] 15
2.4 Short-term Traffic Flow Prediction with LSTM Recurrent Neural Network [10] 16
2.5 交通流量預測 [1、9、12、16、20、21、22] 16

第三章 研究方法 18
3.1 問題分析 18
3.1.1 資料來源與總類 18
3.1.2 交通流量預測分析方法 19
3.3 方法論 19
3.3 流程圖 35

第四章 模擬實驗與結果分析 36
4.1 實驗環境與假設 36
4.2 模擬實驗 37
4.3 實驗結果 39
4.3.1 實驗一(Vanilla架構) 39
4.3.2 實驗二(Stacked架構) 79
4.3.3 實驗三(Encoder-Decoder架構) 109
4.4 綜合比較 143

第五章 結論與未來研究 144

參考文獻 145
zh_TW
dc.format.extent 8145867 bytes-
dc.format.mimetype application/pdf-
dc.source.uri (資料來源) http://thesis.lib.nccu.edu.tw/record/#G0106753014en_US
dc.subject (關鍵詞) 交通流量預測zh_TW
dc.subject (關鍵詞) 深度學習zh_TW
dc.subject (關鍵詞) LSTM記憶單元zh_TW
dc.subject (關鍵詞) GRU控制單元zh_TW
dc.subject (關鍵詞) Traffic Flow Predictionen_US
dc.subject (關鍵詞) Deep Learningen_US
dc.subject (關鍵詞) LSTMen_US
dc.subject (關鍵詞) GRUen_US
dc.title (題名) LSTM及GRU模型用於預測市區交通流量之研究zh_TW
dc.title (題名) A Study of Traffic Flow Prediction Using LSTM and GRUen_US
dc.type (資料類型) thesisen_US
dc.relation.reference (參考文獻) 1. M. S. Ahmed and A. R. Cook, “Analysis of Freeway Traffic Time-Series Data by Using Box–Jenkins Techniques,” Transp. Res. Rec., no. 722, pp. 1–9, 1979.
2. Usman Ali and Tariq Mahmood, “Using Deep Learning to Predict Short Term Traffic Flow: A Systematic Literature Review,” Part of the Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering book series(LNICST, volume 222), Jul. 2018.
3. Yuan-Yuan Chen, Yisheng Lv, Zhenjiang Li, and Fei-Yue Wang, “Long Short-Term Memory Model for Traffic Congestion Prediction with Online Open Data,” IEEE 19th International Conference on Intelligent Transportation System, 2016.
4. Xunsheng Du, Huaqing Zhang, Hien Van Nguyen and Zhu Han, “Stacked LSTM Deep Learning Model for Traffic Prediction in Vehicle-to-Vehicle Communication,” 2017 IEEE 86th Vehicular Technology Conference (VTC-Fall), Toronto, ON, Canada, Sept. 24-27, 2017.
5. Rui Fu, Zuo Zhang, Li Li, “Using LSTM and GRU Neural Network Methods for Traffic Flow Prediction,” Chinese Association of Automation(YAC), Youth Academic Annual Conference of, January 2017.
6. Yarin Gal and Zoubin Ghahramani, “A Theoretically Grounded Application of Dropout in Recurrent Neural Networks,” arXiv preprint arXiv:1512.05297v5 2016.
7. Hung-Chin Jang and Ting-Kuan Lin, "Traffic-Aware Traffic Signal Control Framework Based on SDN and Cloud-Fog Computing," 2018 IEEE 88th Vehicular Technology Conference (VTC 2018-Fall), Chicago, USA, Aug. 27 - 30, 2018.
8. Hung-Chin Jang and Yu-Hsiang Chang, "Traffic Flow Forecast for Traffic with Forecastable Sporadic Events," The 12th International Conference on Ubi-Media Computing (Ubi-Media 2019), Bali, Indonesia, Aug. 6-9, 2019.
9. A. Krizhevsky, I. Sutskever and G. E. Hinton, “ImageNet Classification with Deep Convolutional Neural Networks,” NIPS’12 Proceedings of the 25th International Conference on Neural Information Processing Systems, vol 1, pp. 1097-1105, Dec. 2012.
10. Danqing Kang, Yisheng Lv and Yuan-Yuan Chen, “Short-term Traffic Flow Prediction with LSTM Recurrent Neural Network,” 2017 IEEE 20th International Conference on Intelligent Transportation Systems (ITSC), Mar. 2018.
11. Diederik Kingma and Jimmy Ba, “Adam: A Method for Stochastic Optimization,” arXiv preprint arXiv:1412.6980v8, 2015.
12. S. Lee and D. Fambro, “Application of Subset Autoregressive Integrated Moving Average Model for Short-Term Freeway Traffic Volume Forecasting,” Transport. Res. Record, 1999, 1678, pp. 179–188.
13. Yipeng Liu, Haifeng Zheng, Xinxin Feng and Zhonghui Chen, “Short-Term Traffic Flow Prediction with Conv-LSTM,” 2017 9th International Conference on Wireless Communications and Signal Processing (WCSP), Dec. 2017.
14. Yangdong Liu, Yizhe Wang, Xiaoguang Yang and Linan Zhang, “Short-term Travel Time Prediction by Deep Learning: A Comparison of Different LSTM-DNN Models,” 2017 IEEE 20th International Conference on Intelligent Transportation Systems (ITSC), Mar. 2018.
15. Colin David Lewis, “Industrial and Business Forecasting Methods: A Practical Guide to Exponential Smoothing and Curve Fitting,” Published: London , Butterworth Scientific, 1982.
16. X. Ma, Z. Tao, Y. Wang, H. Yu and Y. Wang, “Long Short-Term Memory Neural Network for Traffic Speed Prediction Using Remote Microwave Sensor Data,” Transp. Res. C, Emerg. Technol., vol. 54, pp. 187-197, May 2015.
17. Tom Mitchell, “Machine Learning,” Boston, Mass. : McGraw-Hill, 1997.
18. Hongxin Shao and Boon-Hee Soong, “Traffic Flow Prediction with Long Short-Term Memory Networks (LSTMs),” 2016 IEEE Region 10 Conference (TENCON), 2016.
19. Ridha Soua, Arief Koesdwiady and Fakhri Karray, “Big-Data-Generated Traffic Flow Prediction Using Deep Learning and Dempster-Shafer Thseory,” in 2016 IEEE IJCNN, pp. 3195-3202, 2016.
20. Y. Tian and L. Pan, “Predicting Short-Term Traffic Flow by Long Short-Term Memory Recurrent Neural Network,” in 2015 IEEE International Conference on Smart City, Chengdu, pp. 153-158, 2015.
21. M. Van Der Voort, M. Dougherty and S. Watson, “Combining Kohonen Maps with ARIMA Time Series Models to Forecast Traffic Flow,” Transport. Res. C: Emerging Technol., 1996, 4, (5), pp. 307–318.
22. B. M. Williams and L. A. Hoel, “Modeling and Forecasting Vehicular Traffic Flow as a Seasonal ARIMA Process: Theoretical Basis and Empirical Results,” J. Transp. Eng., vol. 129, no. 6, pp. 664–672, 2003.
23. Da Zhang and Mansur R. Kabuba, “Combining Weather Condition Data to Predict Traffic Flow: A GRU Based Deep Learning Approach,” 2017 IEEE 15th Intl Conf on Dependable, Autonomic and Secure Computing, 15th Intl Conf on Pervasive Intelligence and Computing, 3rd Intl Conf on Big Data Intelligence and Computing and Cyber Science and Technology Congress(DASC/PiCom/DataCom/CyberSciTech), Apr. 2017.
24. Zheng Zhao, Weihai Chen, Xingming Wu, Peter C. Y. Chen, Jingmeng Liu, “LSTM Network: A Deep Learning Approach for Short-Term Traffic Forecast,” IET Intelligent Transport Systems , vol. 11 , Issue: 2 , Mar. 2017.
25. IBM Smart Cities, http://www-07.ibm.com/tw/dp-cs/smartercity/overview.html, retrieved date Oct. 6, 2018.
26. Nvidia人工智慧、機器學習、深度學習, https://blogs.nvidia.com.tw/2016/07/whats-difference-artificial-intelligence-machine-learning-deep-learning-ai, retrieved Oct 6, 2018.
27. 臺北智慧城市推動主軸, https://drive.google.com/file/d/1FZvBks9UJEh5c3SxtDRfL6Tnhqy6Lrmg/view, retrieved data Oct. 6, 2018.
zh_TW
dc.identifier.doi (DOI) 10.6814/NCCU201901182en_US