Machine Learning Based Recommender System For E-Commerce
Machine Learning Based Recommender System For E-Commerce
Corresponding Author:
Manal Loukili
Artificial Intelligence, Data Science and Emerging Systems laboratory, National School of Applied Sciences,
Sidi Mohamed Ben Abdellah University
Fez, Morocco
Email: [email protected]
1. INTRODUCTION
Today, with the development of digital technologies and the ease of access to the internet, we are more
and more exposed to a wealth of information [1]. This development brings a lot of diversity to users, but this
multitude of information sources and information overload can become problematic [2]. In order to remedy this
problem, various tools have been developed to filter information before transmitting it to users. Recommendation
systems are tools that allow such filtering [3]. The main goal of these systems is to facilitate decision making for
users by offering them information according to their preferences [4], [5].
Generally, there are two main categories of recommendation systems. One is done with content-based
filtering and the other is done with collaborative filtering [6]. The content-based approach is implemented by
taking into account the characteristics of the recommended products and creating groups of products using a
similarity measure on their content [7]. Content implies a relationship between a word and a product [8]. One of
the main drawbacks of this approach is that the features are usually acquired using external information that is not
always available. On another note, collaborative filtering typically uses a neighborhood of similar users and
recommended products based on the history of other users within the same neighborhood [9]. When systems issue
their recommendations, they can do so globally or locally [10]. "Globally" means that all users will receive the
same recommendations. While "locally" means that the recommended items will not be the same for all users.
Two approaches exist in the literature when developing a recommendation system using collaborative
filtering [11]. The first approach is memory-based. That is, the system will issue its recommendations based on a
neighborhood contained in memory. Whereas the second approach is rather model based [12]. Thus, it is
necessary to first create models that resemble the users' behaviors and then use these models to issue
recommendations. In practice, it has been shown that the memory-based approach offers better performance in
terms of accuracy while the model-based approach is more efficient at large scale with large data sets.
There are mainly two types of information that are used by recommender systems, implicit and explicit
information [13]. Explicit information is translated as information provided by the user. It is possible to provide
this information through the use of ratings, wish lists, and comments. Unlike explicit information, implicit
information uses only information for which the user has not been asked. For example, when a user buys a product,
it creates a purchase history for that user. It is possible for implicit information recommendation systems to use
this information to create different user profiles.
This paper is structured. Section 2 is devoted to some related work. Section 3 presents the background
of recommender systems. Section 4 describes our methodology. Section 5 present the results obtained. Section 6
concludes the paper.
2. RELATED WORK
In this section, some recent papers on recommender systems in e-commerce are cited. Kuo and
Cheng [14] proposed a personalized content-based recommender system integrating the architecture of the
existing traditional content-based recommender system for e-commerce with the addition of a feedback adjuster.
The results showed that the proposed system which is based on a more objective approach can determine customer
preferences based on their repeated purchase behavior, thus avoiding subjective judgments. Huang [15] conducted
a comparative analysis of three popular recommendation algorithms on a data set of the Alibaba website. The
experimental results revealed that the convolutional neural network recommendation algorithm based on deep
learning outperformed the other algorithms. In another study [16], Chehal et al. proposed an approach to improve
recommendations by taking advantage of the product evaluation feature. This method involves extracting product
features from user-provided feedback and not recommending products with irrelevant features in order to improve
the recommendation list. In [17], a comparative study was conducted of various collaborative filtering algorithms
to evaluate their performance, namely: K-Nearest Neighbor, Slope One, co-clustering and Non-negative Matrix
Factorization. The results showed that the K-Nearest Neighbor algorithm for item-based collaborative filtering
outperformed the other models. In [18], Xuecong et al. implemented a solution to build an e-commerce
recommendation system on the cloud computing platform to manage massive commodity information and user
information more efficiently. The proposed solution enables them to increase the capability of massive data
mining and business intelligence analysis and achieve high-performance computing at reduced cost. The authors
suggested in [19] an approach of collecting and pre-processing real-time data from multiple e-commerce
platforms, which generate user data, and gathering all personalized user data to prepare for the next data mining,
and then using the data mining technology in big data to automatically recommend personalized products to
satisfy the personalized needs and tastes of customers. In [20], in order to identify customer preferences, the
authors proposed an improved conjoint analysis method. To evaluate their method, they compared it with other
prediction algorithms namely: generalized linear model, decision tree, random forest, gradient boosted trees, and
support vector machine. The experimental results showed that this joint analysis network performs well and works
good for choosing a product among several attributes to get the best price despite its limitations.
3. BACKGROUND
There are various types of approaches to realize a recommender system. In this section, the approaches
discussed apply to both explicit and implicit information recommender systems. In general, a recommender
system is a means of filtering data of user’s "U", a set of products "P" and a utility function "h" that indicates
the level of interest of a user in a given product. Consequently, recommender systems can be considered as a
function to be maximized, which can be written in the following form (1).
Where "I" refers to a group of products for "U", and the utility function "h" is particular to the
employed type of approach. As well, the utility function "h" depends on the type of information used, either
implicit or explicit. The group of products "I" plays a crucial role in the formulation of a recommender system,
as it represents the set of items that can be recommended to the users. The size and composition of this group
can have a significant impact on the accuracy and relevance of the recommendations generated by the system.
Additionally, the choice of the utility function "h" is specific to the employed approach and is influenced by
the type of information used, whether implicit or explicit. For instance, the utility function for a collaborative
filtering approach is often based on the similarity between users or items, while the utility function for a
content-based approach is based on the attributes or features of the items. The utility function should be chosen
carefully to ensure that the recommendations generated by the system align with the user's preferences and
needs.
𝑥⃗.𝑦⃗⃗
cos(𝑥⃗, 𝑦⃗) = (2)
||𝑥⃗||∗||𝑦⃗⃗||
𝑛
∑𝑖=1(𝑥𝑖 −𝑥̄ )(𝑦𝑖 −𝑦̄ )
𝑃𝐶(𝑥, 𝑦) = (3)
𝑛∗𝑠𝑡𝑑𝑒𝑣(𝑥)∗𝑠𝑡𝑑𝑒𝑣(𝑦)
a product [29]. Following this idea, it is then possible to capture facts that could motivate some users to prefer
certain products without it being obvious to a traditional system. However, it is difficult with this approach to
explain the reasoning behind a recommendation, as the guidelines do not have properly identified labels. That
is, a latent factor may be a mixture of different regular factors.
Latent model development in the area of recommender systems often employs the matrix factorization
technique [30]. This technique allows users and products to be associated in a new space where the relationships
between users and products can be defined by using the dot product. The matrix in the initial space is usually
formed of users for the rows and products for the columns. Thus, to compute an estimated score for a product,
one must take the user vector and the product vector in the latent space and then compute the dot product
between these two vectors. However, since data sets for recommender systems are often scattered, it is
important to be careful not to add too much noise to the new space.
prefix-tree structure to store compressed and crucial frequent pattern information, called a frequent pattern tree
(FP-tree), which preserves the association information of item-sets [46].
4. METHODOLOGY
To overcome the problem of customer decision making and to increase sales, the implementation of
an accurate and efficient product recommendation system is crucial [47]. In this paper, an association rule-
based recommendation system, via the FP-Growth algorithm, is adopted because it provides high accuracy
while being easy to implement and explain. Thus, the results of this model are understandable: all the rules
specific to the activity can be read in the association table. The Figure 1 shows the steps of our methodology.
Once the association rules were established using the FP-Growth model, they were applied to the
customers' product baskets. This was done to recommend products to customers based on their past purchase history.
Using the recommended products, the estimated prices were then calculated, as demonstrated in Figure 5.
6. CONCLUSION
In today's information-intensive age, data overload has become an obstacle to making the right
decisions at the right time. Particularly for e-consumers, accurately and quickly determining the information
that is of interest to them in this constant chaos is a primary challenge for every e-commerce organization. For
this reason, recommendation systems are called upon to solve this problem and help users make the right
decisions. In this light, the objective of our study was to implement a recommendation system based on
association rules via the FP-Growth algorithm. The limitation of this work is that some of the evaluation
characteristics of a recommender system, such as diversity and explainability, are difficult to define. Real-
world evaluation, including A/B testing and sample testing, is a powerful technique for evaluating a new
recommender system. Indeed, as a next work, we will set up recommendation systems based on different
machine learning models to conduct A/B testing and define the best performing model.
ACKNOWLEDGEMENTS
M. Loukili author is very grateful and appreciative for the support and guidance of her thesis
supervisors, the members of the Laboratory of Artificial Intelligence, Data Science and Emerging Systems
(LIASSE), not to mention all the professors of the University Sidi Mohamed Ben Abdellah of Fez, Morocco.
It should be noted that this project was carried out as part of a doctoral thesis and did not receive any external
research funding or grants.
REFERENCES
[1] M. Loukili, F. Messaoudi, and M. El Ghazi, “Supervised learning algorithms for predicting customer churn with hyperparameter
optimization,” International Journal of Advances in Soft Computing and its Applications, vol. 14, no. 3, pp. 49–63, 2022,
doi: 10.15849/IJASCA.221128.04.
[2] P. M. Alamdari, N. J. Navimipour, M. Hosseinzadeh, A. A. Safaei, and A. Darwesh, “A systematic study on the recommender
systems in the e-commerce,” IEEE Access, vol. 8, pp. 115694–115716, 2020, doi: 10.1109/ACCESS.2020.3002803.
[3] Z. Batmaz, A. Yurekli, A. Bilge, and C. Kaleli, “A review on deep learning for recommender systems: challenges and remedies,”
Artificial Intelligence Review, vol. 52, no. 1, pp. 1–37, 2019, doi: 10.1007/s10462-018-9654-y.
[4] M. Loukili, F. Messaoudi, and M. El Ghazi, “Sentiment analysis of product reviews for e-commerce recommendation based on
machine learning,” International Journal of Advances in Soft Computing and its Applications, vol. 15, no. 1, pp. 1–13, 2023,
doi: 10.15849/IJASCA.230320.01.
[5] S. Rawat, U. Tyagi, and S. Singhal, “Recommender systems in e-commerce and their challenges,” Proceedings - 2021 3rd
International Conference on Advances in Computing, Communication Control and Networking, ICAC3N 2021, pp. 1598–1601,
2021, doi: 10.1109/ICAC3N53548.2021.9725681.
[6] S. Salloum and D. Rajamanthri, “Implementation and evaluation of movie recommender systems using collaborative filtering,”
Journal of Advances in Information Technology, vol. 12, no. 3, pp. 189–196, 2021, doi: 10.12720/jait.12.3.189-196.
[7] A. H. Espejel and F. J. Cantu-Ortiz, “Data mining techniques to build a recommender system,” Proceedings - 2021 International
Symposium on Computer Science and Intelligent Controls, ISCSIC 2021, pp. 217–221, 2021,
doi: 10.1109/ISCSIC54682.2021.00047.
[8] Q. Ai, V. Azizi, X. Chen, and Y. Zhang, “Learning heterogeneous knowledge base embeddings for explainable recommendation,”
Algorithms, vol. 11, no. 9, 2018, doi: 10.3390/a11090137.
[9] Z. Cui et al., “Personalized recommendation system based on collaborative filtering for IoT scenarios,” IEEE Transactions on
Services Computing, vol. 13, no. 4, pp. 685–695, 2020, doi: 10.1109/TSC.2020.2964552.
[10] “XXX.”
[11] G. George and A. M. Lal, “Hy-MOM: Hybrid recommender system framework using memory-based and model-based collaborative
filtering framework,” Cybernetics and Information Technologies, vol. 22, no. 1, pp. 134–150, 2022, doi: 10.2478/cait-2022-0009.
[12] Z. Noshad, A. Bouyer, and M. Noshad, “Mutual information-based recommender system using autoencoder,” Applied Soft
Computing, vol. 109, 2021, doi: 10.1016/j.asoc.2021.107547.
[13] M. Riyahi and M. K. Sohrabi, “Providing effective recommendations in discussion groups using a new hybrid recommender system
based on implicit ratings and semantic similarity,” Electronic Commerce Research and Applications, vol. 40, 2020, doi:
10.1016/j.elerap.2020.100938.
[14] R. J. Kuo and H. R. Cheng, “A content-based recommender system with consideration of repeat purchase behavior,” Applied Soft
Computing, vol. 127, 2022, doi: 10.1016/j.asoc.2022.109361.
[15] G. Huang, “E-commerce intelligent recommendation system based on deep learning,” 2022 IEEE Asia-Pacific Conference on Image
Processing, Electronics and Computers, IPEC 2022, pp. 1154–1157, 2022, doi: 10.1109/IPEC54454.2022.9777500.
[16] D. Chehal, P. Gupta, and P. Gulati, “An approach to utilize e-commerce product reviews to remove irrelevant recommendations,”
2022 IEEE Delhi Section Conference, DELCON 2022, 2022, doi: 10.1109/DELCON54057.2022.9753277.
[17] M. Al-Ghamdi, H. Elazhary, and A. Mojahed, “Evaluation of collaborative filtering for recommender systems,” International
Journal of Advanced Computer Science and Applications, vol. 12, no. 3, pp. 559–564, 2021, doi: 10.14569/IJACSA.2021.0120367.
[18] C. Xuecong, L. Zhaoming, and C. Sisi, “Design and implementation of e-commerce recommendation system model based on cloud
computing,” Proceedings of IEEE Asia-Pacific Conference on Image Processing, Electronics and Computers, IPEC 2021,
pp. 1100–1103, 2021, doi: 10.1109/IPEC51340.2021.9421260.
[19] Z. Wang, A. Maalla, and M. Liang, “Research on e-commerce personalized recommendation system based on big data technology,”
Proceedings of 2021 IEEE 2nd International Conference on Information Technology, Big Data and Artificial Intelligence, ICIBA
2021, pp. 909–913, 2021, doi: 10.1109/ICIBA52610.2021.9687955.
[20] A. B. Osmond and F. Hidayat, “Electronic commerce product recommendation using enhanced conjoint analysis,” International
Journal of Advanced Computer Science and Applications, vol. 12, no. 11, pp. 666–673, 2021, doi: 10.14569/IJACSA.2021.0121176.
[21] L. Long, F. Huang, Y. Yin, and Y. Xu, “Multi-task learning for collaborative filtering,” International Journal of Machine Learning
and Cybernetics, vol. 13, no. 5, pp. 1355–1368, 2022, doi: 10.1007/s13042-021-01451-0.
[22] Y. Koren and R. Bell, “Advances in collaborative filtering,” in Recommender Systems Handbook, Boston, MA: Springer US, 2015,
pp. 77–118.
[23] M. Ahmadian, M. Ahmadi, and S. Ahmadian, “A reliable deep representation learning to improve trust-aware recommendation
systems,” Expert Systems with Applications, vol. 197, 2022, doi: 10.1016/j.eswa.2022.116697.
[24] B. Y. Pratama, I. Budi, and A. Yuliawati, “Product recommendation in offline retail industry by using collaborative filtering,”
International Journal of Advanced Computer Science and Applications, vol. 11, no. 9, pp. 635–643, 2020,
doi: 10.14569/IJACSA.2020.0110975.
[25] W. Li, J. Cao, J. Wu, C. Huang, and R. Buyya, “A collaborative filtering recommendation method based on discrete quantum-
inspired shuffled frog leaping algorithms in social networks,” Future Generation Computer Systems, vol. 88, pp. 262–270, 2018,
doi: 10.1016/j.future.2018.05.070.
[26] M. Raizada, “Survey on recommender systems incorporating trust,” Proceedings - International Conference on Applied Artificial
Intelligence and Computing, ICAAIC 2022, pp. 1011–1015, 2022, doi: 10.1109/ICAAIC53929.2022.9792731.
[27] Q. Wu et al., “Dual graph attention networks for deep latent representation of multifaceted social effects in recommender systems,”
The Web Conference 2019 - Proceedings of the World Wide Web Conference, WWW 2019, pp. 2091–2102, 2019,
doi: 10.1145/3308558.3313442.
[28] Z. Khan, N. Iltaf, H. Afzal, and H. Abbas, “Enriching non-negative matrix factorization with contextual embeddings for
recommender systems,” Neurocomputing, vol. 380, pp. 246–258, 2020, doi: 10.1016/j.neucom.2019.09.080.
[29] G. Adomavicius, K. Bauman, A. Tuzhilin, and M. Unger, “Context-aware recommender systems: From foundations to recent
developments,” Recommender Systems Handbook, pp. 211–250, 2022, doi: 10.1007/978-1-0716-2197-4_6.
[30] N. Idrissi and A. Zellou, “A systematic literature review of sparsity issues in recommender systems,” Social Network Analysis and
Mining, vol. 10, no. 1, 2020, doi: 10.1007/s13278-020-0626-2.
[31] Y. Zheng and D. (Xuejun) Wang, “A survey of recommender systems with multi-objective optimization,” Neurocomputing,
vol. 474, pp. 141–153, 2022, doi: 10.1016/j.neucom.2021.11.041.
[32] E. Saha and P. Rathore, “Discovering hidden patterns among medicines prescribed to patients using Association Rule Mining
Technique,” International Journal of Healthcare Management, 2022, doi: 10.1080/20479700.2022.2099335.
[33] I. H. Sarker, “Machine learning: algorithms, real-world applications and research directions,” SN Computer Science, vol. 2, no. 3,
2021, doi: 10.1007/s42979-021-00592-x.
[34] K. H. T. Dam, T. Given-Wilson, A. Legay, and R. Veroneze, “Packer classification based on association rule mining,” Applied Soft
Computing, vol. 127, 2022, doi: 10.1016/j.asoc.2022.109373.
[35] S. Das, X. Sun, S. Goel, M. Sun, A. Rahman, and A. Dutta, “Flooding related traffic crashes: Findings from association rules,”
Journal of Transportation Safety and Security, vol. 14, no. 1, pp. 111–129, 2022, doi: 10.1080/19439962.2020.1734130.
[36] A. Telikani, A. H. Gandomi, and A. Shahbahrami, “A survey of evolutionary computation for association rule mining,” Information
Sciences, vol. 524, pp. 318–352, 2020, doi: 10.1016/j.ins.2020.02.073.
[37] S. Singh and A. Yassine, “Big data mining of energy time series for behavioral analytics and energy consumption forecasting,”
Energies, vol. 11, no. 2, 2018, doi: 10.3390/en11020452.
[38] Y. A. Ünvan, “Market basket analysis with association rules,” Communications in Statistics - Theory and Methods, vol. 50, no. 7,
pp. 1615–1628, 2021, doi: 10.1080/03610926.2020.1716255.
[39] A. Griva, C. Bardaki, K. Pramatari, and D. Papakiriakopoulos, “Retail business analytics: Customer visit segmentation using market
basket data,” Expert Systems with Applications, vol. 100, pp. 1–16, 2018, doi: 10.1016/j.eswa.2018.01.029.
[40] A. Doniec, S. Lecoeuche, R. Mandiau, and A. Sylvain, “Purchase intention-based agent for customer behaviours,” Information
Sciences, vol. 521, pp. 380–397, 2020, doi: 10.1016/j.ins.2020.02.054.
[41] and F. M. S. Mukherjee, P. Gupta, “Integrating application with algorithms of association rule used in descriptive data modelling,
through which data mining can be implemented for future prediction,” International Journal of Applied Engineering Research,
vol. 13, no. 17, pp. 13272–13281, 2018.
[42] N. K. Verma and V. Singh, “A rational approach to improve access time of apriori algorithm by applying inner join in a arm to
redefining fis in textual data,” ECS Transactions, vol. 107, no. 1, pp. 7749–7758, 2022, doi: 10.1149/10701.7749ecst.
[43] H. Xie, “Research and case analysis of apriori algorithm based on mining frequent item-sets,” Open Journal of Social Sciences,
vol. 09, no. 04, pp. 458–468, 2021, doi: 10.4236/jss.2021.94034.
[44] M. Patil and T. Patil, “Apriori algorithm against FP growth algorithm: a comparative study of data mining algorithms,” SSRN
Electronic Journal, 2022, doi: 10.2139/ssrn.4113695.
[45] L. Shabtay, P. Fournier-Viger, R. Yaari, and I. Dattner, “A guided FP-growth algorithm for mining multitude-targeted item-sets and
class association rules in imbalanced data,” Information Sciences, vol. 553, pp. 353–375, 2021, doi: 10.1016/j.ins.2020.10.020.
[46] A. Javed and A. Khokhar, “Frequent pattern mining on message passing multiprocessor systems,” Distributed and Parallel
Databases, vol. 16, no. 3, pp. 321–334, 2004, doi: 10.1023/B:DAPD.0000031634.19130.bd.
[47] M. L. and F. Messaoudi, “Machine learning, deep neural network and natural language processing based recommendation system,”
2022 International Conference on Advanced Intelligent Systems for Sustainable Development, Lecture Notes in Networks and
Systems AI2SD, 2023.
[48] Daqing Chen, “Online retail data set,” UCI Machine Learning Repository, 2012, [Online]. Available:
http://archive.ics.uci.edu/ml/datasets/Online+Retail.
BIOGRAPHIES OF AUTHORS
Dr. Eng. Manal Loukili is an IT engineer and PhD student at the University of
Sidi Mohamed Ben Abdellah in Fez, Morocco. She is a member of the laboratory: Artificial
Intelligence, Data Science and Emerging Systems (IASSE). Her principal research areas are
Machine Learning and E-Marketing. She can be contacted at email:
[email protected].