Milica Ćirić, Bratislav Predić

DOI Number
First page
Last page


This research focuses on trying to predict the moment of the next purchase for a customer in vendor-customer B2B scenario using an LSTM neural network and comparing prediction results from different input features. In a previous research we performed predictions for a specific customer product pair and used previous purchases for that pair as input data, but  the number of such previous purchases was often very limited which resulted in low accuracy of predictions. By aggregating purchase data for all products a customer purchased, we were able to get more precise predictions of the next purchase. Additionally, expanding our input feature set yielded even better results. We performed an evaluation of LSTM networks trained with the most successful combination of input features for a six month period. Each of the networks was trained with purchase data up to the starting point of the selected period and the predictions were performed, after which additional input for the following seven days was added to the network. This process was then repeated for the entire six month period and a slight downward trend can be noticed for error metrics, leading to the conclusion that the network would perform even better over time with the addition of future purchases.


Purchase prediction, time series, long short-term memory neural network

Full Text:



Y. Chai, G. Liu, Z. Chen, F. Li, Y. Li, and E. A. Effah, “A Temporal Collaborative Filtering Algorithm Based on Purchase Cycle,”, Cloud Computing and Security, vol. 11064, X. Sun, Z. Pan, and E. Bertino, Eds. Cham: Springer International Publishing, 2018, pp. 191–201, doi: 10.1007/978-3-030-00009-7_18

J. Gruenen, C. Bode, and H. Hoehle, “Predictive Procurement Insights: B2B Business Network Contribution to Predictive Insights in the Procurement Process Following a Design Science Research Approach”, Designing the Digital Transformation, vol 10243, Springer, 2017, pp. 267–281, doi: 10.1007/978-3-319-59144-5_16.

M. Ćirić and B. Predić, “Predicting Purchase Day in B2B: From Statistical Methods towards LSTM Neural Networks,”, Proceedings of the 10th International Conference on Information Society and Technology, Kopaonik, Serbia, 2020, ISBN: 978-86-85525-24-7, pp. 193-197.

B. Predić, N. Radosavljević, and A. Stojčić, “Time Series Analysis: Forecasting Sales Periods in Wholesale Systems” Facta Univ. Ser. Autom. Control Robot., vol. 18, no. 3, Art. no. 3, Jan. 2020, doi: 10.22190/FUACR1903177P.

A. Verma, “Consumer Behaviour in Retail: Next Logical Purchase using Deep Neural Network” ArXiv201006952 Cs, Oct. 2020, Accessed: Nov. 11, 2020. [Online]. Available:

S.-M. Xie and C.-Y. Huang, “Systematic comparisons of customer base prediction accuracy: Pareto/NBD versus neural network” Asia Pac. J. Mark. Logist., vol. ahead-of-print, no. ahead-of-print, May 2020, doi: 10.1108/APJML-09-2019-0520.

R. Gangurde, D. B. Kumar, and D. S. D. Gore, “Optimized Predictive Model using Artificial Neural Network for Market Basket Analysis”, International Journal of Computer Science and Communication, vol 9, issue 1, 2018, pp. 42-52, doi: 10.090592/IJCSC.2017.014

M. Hendriksen, E. Kuiper, P. Nauts, S. Schelter, and M. de Rijke, “Analyzing and Predicting Purchase Intent in E-commerce: Anonymous vs. Identified Customers”, SIGIR '20: Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, 2020, ISBN: 978-1-4503-8016-4, pp.

M. Korpusik, S. Sakaki, and F. C. Y.-Y. Chen, “Recurrent Neural Networks for Customer Purchase Prediction on Twitter”, CBRecSys: Workshop on New Trends in Content-Based Recommender Systems at ACM Recommender Systems Conference, 2016, ISSN: 1613-0073, pp. 47-50

D. Cirqueira, M. Helfert, and M. Bezbradica, “Towards Preprocessing Guidelines for Neural Network Embedding of Customer Behavior in Digital Retail”, Proceedings of the 2019 3rd International Symposium on Computer Science and Intelligent Control, Amsterdam Netherlands, Sep. 2019, pp. 1–6, doi: 10.1145/3386164.3389092.

A. Martínez, C. Schmuck, S. Pereverzyev, C. Pirker, and M. Haltmeier, “A machine learning framework for customer purchase prediction in the non-contractual setting” Eur. J. Oper. Res., vol. 281, no. 3, pp. 588–596, Mar. 2020, doi: 10.1016/j.ejor.2018.04.034.

C. Huang et al., “Online Purchase Prediction via Multi-Scale Modeling of Behavior Dynamics” in Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Anchorage AK USA, Jul. 2019, pp. 2613–2622, doi: 10.1145/3292500.3330790.

S. Stubseid and O. Arandjelovic, “Machine Learning Based Prediction of Consumer Purchasing Decisions: The Evidence and Its Significance”, Proceeding of AAAI Conference on Artificial Intelligence, Feb. 2018, ISBN 978-1-57735-801-5, pp. 100-106

G. Suchacka and S. Stemplewski, “Application of Neural Network to Predict Purchases in Online Store” in Information Systems Architecture and Technology: Proceedings of 37th International Conference on Information Systems Architecture and Technology – ISAT 2016 – Part IV, vol. 524, Z. Wilimowska, L. Borzemski, A. Grzech, and J. Świątek, Eds. Cham: Springer International Publishing, 2017, ISBN: 978-3-319-46583-8, pp. 221–231.

S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory” Neural Comput., vol. 9, no. 8, , Nov. 1997, pp. 1735–1780, doi: 10.1162/neco.1997.9.8.1735.

F. A. Gers, J. Schmidhuber, and F. Cummins, “Learning to forget: continual prediction with LSTM”, 1999 Ninth International Conference on Artificial Neural Networks ICANN 99. (Conf. Publ. No. 470), 1999, pp. 850–855, doi: 10.1049/cp:19991218.

S. Hochreiter, “The Vanishing Gradient Problem During Learning Recurrent Neural Nets and Problem Solutions,” Int. J. Uncertain. Fuzziness Knowl.-Based Syst., vol. 06, no. 02, pp. 107–116, Apr. 1998, doi: 10.1142/S0218488598000094.

F. Gers, “Long Short-Term Memory in Recurrent Neural Networks,” PhD thesis, Ecole Polytechnique Federale De Lausanne, May 2001, doi: 10.5075/epfl-thesis-2366.

A. Graves, “Generating Sequences With Recurrent Neural Networks,” ArXiv13080850 Cs, Jun. 2014, Accessed: Nov. 11, 2020. [Online]. Available:

“Keras: the Python deep learning API.” (accessed Nov. 15, 2020).

M. Abadi et al., “TensorFlow: A system for large-scale machine learning”, Proceedings of the 12th USENIX conference on Operating Systems Design and Implementation, November 2016, ISBN: 978-1-931971-33-1, pp. 265–283



  • There are currently no refbacks.

Print ISSN: 1820-6417
Online ISSN: 1820-6425