Restaurant Customer Flow Prediction Based on CNN-LSTM-Attention Model

Journal: Modern Economics & Management Forum DOI: 10.32629/memf.v6i1.3560

Shaowei Dong

School of Economics and Management, Tongji University, Shanghai, China

Abstract

Customer flow prediction is essential for optimizing resource allocation and enhancing operational efficiency in restaurants. This paper addresses the challenge of predicting restaurant customer flow by incorporating external data, such as platform views and weather conditions, alongside feature derivation and selection to improve data quality. For the model design, we propose a hybrid prediction model based on CNN-LSTM-Attention. The CNN is used for local feature extraction, the LSTM captures the long-term dependencies of the time series, and the Attention mechanism dynamically focuses on key features. Through comparative and ablation experiments, we demonstrate that the proposed model significantly outperforms other benchmark models in metrics such as MAPE, RMSE, and R², indicating superior prediction performance. Additionally, SHAP-based explainability analysis further illuminates the influence of key features on the prediction results, enhancing the model's explainability and practical application value.

Keywords

customer flow prediction; deep learning; feature engineering; explainability

References

[1] National Bureau of Statistics of China (2024). China Statistical Yearbook. Beijing, China: China Statistics Press.
[2] Bao, W., Yue, J., & Rao, Y. (2017). A deep learning framework for financial time series using stacked autoencoders and long-short term memory. PloS one, 12(7), e0180944.
[3] Kong, W., Dong, Z. Y., Jia, Y., Hill, D. J., Xu, Y., & Zhang, Y. (2017). Short-term residential load forecasting based on LSTM recurrent neural network. IEEE transactions on smart grid, 10(1), 841-851.
[4] Lv, Y., Duan, Y., Kang, W., Li, Z., & Wang, F.-Y. (2014). Traffic flow prediction with big data: A deep learning approach. Ieee transactions on intelligent transportation systems, 16(2), 865-873.
[5] Ceylan, Z. (2020). Estimation of COVID-19 prevalence in Italy, Spain, and France. Science of The Total Environment, 729, 138817.
[6] Amini, M. H., Kargarian, A., & Karabasoglu, O. (2016). ARIMA-based decoupled time series forecasting of electric vehicle charging demand for stochastic power system operation. Electric Power Systems Research, 140, 378-390.
[7] Cai, W., Peng, Y., & Chen, Q. (2019). Prediction of air transportation passenger volume based on multivariate regression model. Aeronautical Computing Technique, 49(4), 50-53.
[8] Candelieri, A., Giordani, I., Archetti, F., Barkalov, K., Meyerov, I., Polovinkin, A., Sysoyev, A., & Zolotykh, N. (2019). Tuning hyperparameters of a SVM-based water demand forecasting system through parallel global optimization. Computers & Operations Research, 106, 202-209.
[9] Qiu, X., Zhang, L., Suganthan, P. N., & Amaratunga, G. A. (2017). Oblique random forest ensemble via least square estimation for time series forecasting. Information Sciences, 420, 249-262.
[10] Wang, Y., Sun, S., Chen, X., Zeng, X., Kong, Y., Chen, J., Guo, Y., & Wang, T. (2021). Short-term load forecasting of industrial customers based on SVMD and XGBoost. International Journal of Electrical Power & Energy Systems, 129, 106830.
[11] Zeng, Z., Xiao, H., & Zhang, X. (2016). Self CNN‐based time series stream forecasting. Electronics Letters, 52(22), 1857-1858.
[12] Kim, T.-Y., & Cho, S.-B. (2019). Predicting residential energy consumption using CNN-LSTM neural networks. Energy, 182, 72-81.
[13] Vaswani, A. (2017). Attention is all you need. Advances in Neural Information Processing Systems.
[14] Pandey, N. K., Mishra, A. K., Kumar, V., Kumar, A., Diwakar, M., & Tripathi, N. (2023). Machine Learning based Food Demand Estimation for Restaurants. 2023 6th International Conference on Information Systems and Computer Networks (ISCON).
[15] Tanizaki, T., Hoshino, T., Shimmura, T., & Takenaka, T. (2020). Restaurants store management based on demand forecasting. Procedia CIRP, 88, 580-583.
[16] Yang, Y., Liu, H., & Chen, X. (2020). COVID-19 and restaurant demand: early effects of the pandemic and stay-at-home orders. International Journal of Contemporary Hospitality Management, 32(12), 3809-3834.
[17] Schmidt, A., Kabir, M. W. U., & Hoque, M. T. (2022). Machine learning based restaurant sales forecasting. Machine Learning and Knowledge Extraction, 4(1), 105-130.
[18] Chae, B. K., Sheu, C., & Park, E. O. (2024). The value of data, machine learning, and deep learning in restaurant demand forecasting: Insights and lessons learned from a large restaurant chain. Decision Support Systems, 184, 114291.
[19] Tianchi. (2018). IJCAI-17 Customer Flow Forecasts on Koubei.com Dataset https://tianchi.aliyun.com/dataset/dataDetail?dataId=58.

Copyright © 2025 Shaowei Dong

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License