Presenting a Hybrid Model for Predicting Consumer Purchase Intent Based on Machine Learning and Social Media Feedback

Document Type : Original Article

Authors

1 Associate Professor, Department of Information Technology, Faculty of Industrial Engineering, Khajeh Nasiruddin Toosi University of Technology, Tehran, Iran

2 Master's student, Department of Information Technology, Faculty of Industrial Engineering, Khajeh Nasiruddin Toosi University of Technology, Tehran, Iran

Abstract
With the rapid growth of online shopping and the significant role of social media in consumer decision-making, purchase intention prediction has become one of the key issues in digital marketing. Accurate prediction of this behavior can improve advertising targeting, increase customer conversion rates, and optimize sales strategies. The purpose of this study is to propose a hybrid machine learning model for predicting users’ purchase intentions based on their responses to advertisements. The dataset consists of 1,000 records and 10 relevant features (including age, gender, income, time spent on the website, daily internet usage, advertisement title, location and time of interaction, and click label), which were collected and cleaned from public sources (Kaggle). After preprocessing and feature selection, a stacking approach was employed, where the outputs of base models (logistic regression and support vector machine) were combined and used for final prediction. Model evaluation using accuracy, precision, recall, and F1-score demonstrated that the proposed model achieved strong performance (accuracy = 0.96, precision = 0.98). The findings indicate that combining demographic and behavioral features can improve purchase intention prediction and provide practical implications for targeted advertising in e-commerce platforms.

Keywords


[1]  Asadollahi, M., S. R. S. Javadin and M. Nazari (2024). "Developing a Framework for Effective Digital Nudges in Online Shopping: A Systematic Literature Review." Management Research in Iran 28(3): 179-208. [In Persian]
[2]  Esmeli, R., M. Bader-El-Den and H. Abdullahi (2021). "Towards early purchase intention prediction in online session based retailing systems." Electronic Markets 31(3): 697-715. https://doi.org/10.1007/s12525-020-00448-x.
[3]  Shahrokh, Z. D. and M. Naeli (2020). "The Impact of Social Media Marketing Activities On Customer Equity of Luxury Brands A Study of Dorsa Brand." Management Research in Iran 24(1): 33-57. [In Persian]
[4]  Algawiaz, D., G. Dobbie and S. Alam (2019). Predicting a user’s purchase intention using AdaBoost. 2019 IEEE 14th International Conference on Intelligent Systems and Knowledge Engineering (ISKE), IEEE. https://doi.org/10.1109/ISKE47853.2019.9170316.
[5]  Drechsler, W. and M. Natter (2011). "Do price charts provided by online shopbots influence price expectations and purchase timing decisions?" Journal of Interactive Marketing 25(2): 95-109. https://doi.org/10.1016/j.intmar.2011.02.001.
[6]  Lamrhari, S., H. El Ghazi, M. Oubrich and A. El Faker (2022). "A social CRM analytic framework for improving customer retention, acquisition, and conversion." Technological Forecasting and Social Change 174: 121275. https://doi.org/https://doi.org/10.1016/j.techfore.2021.121275.
[7]  Nasir, V. A., A. C. Keserel, O. E. Surgit and M. Nalbant (2021). "Segmenting consumers based on social media advertising perceptions: How does purchase intention differ across segments?" Telematics and informatics 64: 101687. https://doi.org/https://doi.org/10.1016/j.tele.2021.101687.
[8]  Pavlou, P. A. (2003). "Consumer acceptance of electronic commerce: Integrating trust and risk with the technology acceptance model." International journal of electronic commerce 7(3): 101-134. https://doi.org/10.1080/10864415.2003.11044275.
[9]  Wu, P. C., G. Y.-Y. Yeh and C.-R. Hsiao (2011). "The effect of store image and service quality on brand image and purchase intention for private label brands." Australasian Marketing Journal 19(1): 30-39. https://doi.org/https://doi.org/10.1016/j.ausmj.2010.11.001.
[10]  Fard, R. S., H. Hosseinzadeh and M. Khajeh (2023). "Deciding On The Main Components Affecting The Social Media Marketing Model By Meta-Synthesis." Journal of Modern Research in Decision Making 8(3): 133-161. [In Persian]
[11]  Wang, S.-C., Y.-T. Tsai and Y.-S. Ciou (2020). "A hybrid big data analytical approach for analyzing customer patterns through an integrated supply chain network." Journal of Industrial Information Integration 20: 100177. https://doi.org/https://doi.org/10.1016/j.jii.2020.100177.
[12]  Chu, Y., H.-K. Yang and W.-C. Peng (2019). Predicting online user purchase behavior based on browsing history. 2019 IEEE 35th international conference on data engineering workshops (ICDEW), IEEE. https://doi.org/10.1109/ICDEW.2019.00-13.
[13]  Bag, S., M. K. Tiwari and F. T. Chan (2019). "Predicting the consumer's purchase intention of durable goods: An attribute-level analysis." Journal of Business Research 94: 408-419. https://doi.org/https://doi.org/10.1016/j.jbusres.2017.11.031.
[14]  Kabir, M. R., F. B. Ashraf and R. Ajwad (2019). Analysis of different predicting model for online shoppers’ purchase intention from empirical data. 2019 22nd International Conference on Computer and Information Technology (ICCIT), IEEE. https://doi.org/10.1109/ICCIT48885.2019.9038521.
[15]  Karthik, R. and S. Ganapathy (2021). "A fuzzy recommendation system for predicting the customers interests using sentiment analysis and ontology in e-commerce." Applied Soft Computing 108: 107396. https://doi.org/10.1016/J.ASOC.2021.107396.
[16]  Alalwan, A. A. (2018). "Investigating the impact of social media advertising features on customer purchase intention." International journal of information management 42: 65-77. https://doi.org/https://doi.org/10.1016/j.ijinfomgt.2018.06.001.
[17]  Noroozi, M., A. Khadivar and F. Abbasi (2023). "Modeling and predicting mobile phone purchase intention of Twitter users based on sentiment analysis." Journal of Modern Research in Decision Making 8(1): 91-112. [In Persian]
[18]  Sreejesh, S., J. Paul, C. Strong and J. Pius (2020). "Consumer response towards social media advertising: Effect of media interactivity, its conditions and the underlying mechanism." International Journal of Information Management 54: 102155. https://doi.org/10.1016/j.ijinfomgt.2020.102155.
[19]  Deng, Q., M. J. Hine, S. Ji and Y. Wang (2021). "Understanding consumer engagement with brand posts on social media: The effects of post linguistic styles." Electronic Commerce Research and Applications 48: 101068. https://doi.org/https://doi.org/10.1016/j.elerap.2021.101068.
[20]  Chang, Y., Y. Li, J. Yan and V. Kumar (2019). "Getting more likes: The impact of narrative person and brand image on customer–brand interactions." Journal of the Academy of Marketing Science 47: 1027-1045. https://doi.org/10.1007/s11747-019-00632-2.
[21]  Duong, H. T., A. A. Amaya Rivas and Y.-K. Liao (2019). "Examining the influence of customer-to-customer electronic word-of-mouth on purchase intention in social networking sites." https://doi.org/https://doi.org/10.1016/j.apmrv.2018.06.003.
[22]  Patel, V., K. Das, R. Chatterjee and Y. Shukla (2020). "Does the interface quality of mobile shopping apps affect purchase intention? An empirical study." Australasian Marketing Journal 28(4): 300-309. https://doi.org/https://doi.org/10.1016/j.ausmj.2020.08.004
[23]  McClure, C. and Y.-K. Seock (2020). "The role of involvement: Investigating the effect of brand's social media pages on consumer purchase intention." Journal of retailing and consumer services 53: 101975. https://doi.org/https://doi.org/10.1016/j.jretconser.2019.101975.
[24]  Bazi, S., R. Filieri and M. Gorton (2020). "Customers’ motivation to engage with luxury brands on social media." Journal of Business Research 112: 223-235. https://doi.org/https://doi.org/10.1016/j.jbusres.2020.02.032.
[25] Ullah, N., M. F. Gulzar and A. A. Arshad (2025). "Enhancing Consumer Purchase Intention in Pakistan Market: The Role of AI Personalization, Prediction Accuracy, and Real-Time Engagement." Asian American Research Letters Journal2(1): 69-74. https://doi.org/10.5281/hc81xc53
[26] Alsaadi, H., A. Wali and B. Fakieh (2025). "Predicting Impact of Digital Ads On Purchasing Intention Using Machine Learning Classification Models." Advances and Applications in Statistics 92(2): 303-342. https://doi.org/10.17654/0972361725014
[27] Denis, J. C. and S. Baskaran (2025). "A predictive model for environmentally responsible purchase intention of organic products: a study from Malaysia." International Journal of Business Innovation and Research 36(2): 204-228. https://doi.org/10.1504/IJBIR.2025.144393
[28]  Kotsiantis, S. B. (2013). "Decision trees: a recent overview." Artificial Intelligence Review 39: 261-283. https://doi.org/10.1007/s10462-011-9272-4.
[29]  Speiser, J. L., M. E. Miller, J. Tooze and E. Ip (2019). "A comparison of random forest variable selection methods for classification prediction modeling." Expert systems with applications 134: 93-101. https://doi.org/https://doi.org/10.1016/j.eswa.2019.05.028.
[30]  Guo, G., H. Wang, D. Bell, Y. Bi and K. Greer (2003). KNN model-based approach in classification. On The Move to Meaningful Internet Systems 2003: CoopIS, DOA, and ODBASE: OTM Confederated International Conferences, CoopIS, DOA, and ODBASE 2003, Catania, Sicily, Italy, November 3-7, 2003. Proceedings, Springer.
[31]  Vijayaragavan, P., R. Ponnusamy and M. Aramudhan (2020). "An optimal support vector machine based classification model for sentimental analysis of online product reviews." Future Generation Computer Systems 111: 234-240. https://doi.org/10.1109/BigData.2018.8622235
[32]  Lv, Z., Y. Jin and J. Huang (2018). "How do sellers use live chat to influence consumer purchase decision in China?" Electronic Commerce Research and Applications 28: 102-113. https://doi.org/10.1016/j.elerap.2018.01.003
[33]  Shahbazi, Z., D. Hazra, S. Park and Y. C. Byun (2020). "Toward improving the prediction accuracy of product recommendation system using extreme gradient boosting and encoding approaches." Symmetry 12(9): 1566. https://doi.org/10.3390/sym12091566
[34]  XingFen, W., Y. Xiangbin and M. Yangchun (2018). Research on user consumption behavior prediction based on improved XGBoost algorithm. 2018 IEEE international conference on big data (Big Data), IEEE. https://doi.org/10.1016/j.future.2020.04.046
[24]  Bazi, S., R. Filieri and M. Gorton (2020). "Customers’ motivation to engage with luxury brands on social media." Journal of Business Research 112: 223-235. https://doi.org/https://doi.org/10.1016/j.jbusres.2020.02.032.
[25] Ullah, N., M. F. Gulzar and A. A. Arshad (2025). "Enhancing Consumer Purchase Intention in Pakistan Market: The Role of AI Personalization, Prediction Accuracy, and Real-Time Engagement." Asian American Research Letters Journal2(1): 69-74. https://doi.org/10.5281/hc81xc53
[26] Alsaadi, H., A. Wali and B. Fakieh (2025). "Predicting Impact of Digital Ads On Purchasing Intention Using Machine Learning Classification Models." Advances and Applications in Statistics 92(2): 303-342. https://doi.org/10.17654/0972361725014
[27] Denis, J. C. and S. Baskaran (2025). "A predictive model for environmentally responsible purchase intention of organic products: a study from Malaysia." International Journal of Business Innovation and Research 36(2): 204-228. https://doi.org/10.1504/IJBIR.2025.144393
[28]  Kotsiantis, S. B. (2013). "Decision trees: a recent overview." Artificial Intelligence Review 39: 261-283. https://doi.org/10.1007/s10462-011-9272-4.
[29]  Speiser, J. L., M. E. Miller, J. Tooze and E. Ip (2019). "A comparison of random forest variable selection methods for classification prediction modeling." Expert systems with applications 134: 93-101. https://doi.org/https://doi.org/10.1016/j.eswa.2019.05.028.
[30]  Guo, G., H. Wang, D. Bell, Y. Bi and K. Greer (2003). KNN model-based approach in classification. On The Move to Meaningful Internet Systems 2003: CoopIS, DOA, and ODBASE: OTM Confederated International Conferences, CoopIS, DOA, and ODBASE 2003, Catania, Sicily, Italy, November 3-7, 2003. Proceedings, Springer.
[31]  Vijayaragavan, P., R. Ponnusamy and M. Aramudhan (2020). "An optimal support vector machine based classification model for sentimental analysis of online product reviews." Future Generation Computer Systems 111: 234-240. https://doi.org/10.1109/BigData.2018.8622235
[32]  Lv, Z., Y. Jin and J. Huang (2018). "How do sellers use live chat to influence consumer purchase decision in China?" Electronic Commerce Research and Applications 28: 102-113. https://doi.org/10.1016/j.elerap.2018.01.003
[33]  Shahbazi, Z., D. Hazra, S. Park and Y. C. Byun (2020). "Toward improving the prediction accuracy of product recommendation system using extreme gradient boosting and encoding approaches." Symmetry 12(9): 1566. https://doi.org/10.3390/sym12091566
[34]  XingFen, W., Y. Xiangbin and M. Yangchun (2018). Research on user consumption behavior prediction based on improved XGBoost algorithm. 2018 IEEE international conference on big data (Big Data), IEEE. https://doi.org/10.1016/j.future.2020.04.046