The purpose of this study is to investigate how people’s food consumption needs are reflected in market baskets.
To find answers to the following research questions is aimed in the study:
1) Do the customers of the supermarket prefer large or small purchases?
2) How are the customers’ preferences according to the types of products?
3) Is there a relationship between the ratio of product types in shopping basket and the number of baskets?
There are many studies related to shopping analysis or market basket analysis. These analyses help the shop managers to study the behavior or buying habits of the customers to increase the sales (PhaniPrasad & Mourya, 2013). The market basket analysis application proposed in (Aguinis, Forcum, & Joo, 2013) not only helps with the design of the sales promotion, but also enables the management of the stock of incoming and outgoing products to the warehouse. In (Boztug & Reutterer, 2008) the authors combine multicategory choice models with a data-driven approach for basket selection. The proposed procedure also takes into account the heterogeneity of customers and thus can serve as a viable tool for developing targeted marketing programs. Market Basket Analysis to identify customer behaviors by way of transaction data was made in (Kurniawan, Hammad, Nugroho, & Hariadi, 2018). The purpose of the study (Musungwini, Zhou, Gumbo, & Mzikamwi, 2014) was to investigate the relationship between Product, Place, Promotion and Price (4 Ps) in Market Basket Analysis. Shopping Cart Analysis System in product layout management with Apriori Algorithm is proposed in (Widiartha & Dewi, 2019).
Data mining methods, especially association rules, are widely used for shopping basket analysis (PhaniPrasad & Mourya, 2013; Boztug & Reutterer, 2008; Kurniawan, Hammad, Nugroho, & Hariadi, 2018; Musungwini, Zhou, Gumbo, & Mzikamwi, 2014; Widiartha & Dewi, 2019; Durdu, 2012; Adali & Balaban, 2019; Sarada & Kumar, 2019; Intan, 2006; Mangalampalli & Pudi, 2012; Lekha, Srikrishna, & Vinod, 2015; Othman & Schneider, 2010). This is why the association rules method is also called the basket analysis method.
In some studies, fuzzy association rules have been used for basket (Cheung & Kaymak, 2007; Sarada & Kumar, 2019, Intan, 2006, Mangalampalli & Pudi, 2009, Lekha, Srikrishna, & Vinod, 2015, Othman & Schneider, 2010). Although there are studies on the use of fuzzy logic in trade (Naranjo, Meco, Arroyo, & Santos, 2015, Oglu & Oglu, 2021, Tealab, Hefny, & Badr 2017), closer to our research topic, there are no studies on analysis of shopping basket, where fuzzy logic used directly.
2. Data Collection and Fuzzy Classification
We will make our analysis on the following parameters: product type, ratio of product types in the basket, basket length (number of products in the transactions), basket number (number of processes).
Food products are classified according to their nutritional values and human health benefits. On (List of foods, What are the basic food groups?) food products are classified as follows:
1) Basic Foods;
2) Staple Foods;
3) Prepared Foods
Basic food products group include:
• Breads, cereals, rice, pasta, noodles and other grains;
• Vegetables and legumes;
• Milk, yoghurt, cheese and/or alternatives;
• Lean meat, fish, poultry, eggs, nuts.
Although there are differences in the classification of products in the literature, the basic products list is roughly the same. Consumption habits of the local people may also affect the list of basic food products.
As a result of the data collected from the sources and interviews with potential customers, the food products have been divided into 3 groups (Table 1).
Since the classification of products is based on the opinions of consumers, this classification is subjective in some sense. In this context, it is more logical to express these categories with fuzzy sets where each product can be included in more than one set with a certain degree of membership. In Figure 1, fuzzy presentation of the product categories obtained by FisPro application is given. FisPro is an open source portable software and allows to creating fuzzy inference systems (FisPro:An open source portable software for fuzzy inference systems FisPro).
Fuzzy variable Product__Type includes three linguistic values: nonbasic1 (NB1), nonbasic2 (NB2) and basic (BP). These variables are expressed in trapezoidal form. For example, the linguistic value nonbasic_1expressed as (2, 4, 5, 7) the membership function is:
Figure 1. Fuzzy presentation of the product categories (screenshot).
Table 1. Food categories.
The values of the endpoints of the trapeze have been determined by expert opinion.
First our question research is “Do the customers of the supermarket prefer large or small purchases?”. This research is important to improve the quality of the service provided to the customer. For this purpose, shopping data made in May 2020 at a supermarket in Baku city were used as research data. Located in the center of the city, this supermarket belongs to the popular supermarket chain in Baku and is highly preferred. Within the scope of the research, about 600 shopping transactions (market baskets) were examined.
All baskets have been divided into 3 fuzzy classes according to the number of products in them, as shown in Table 2.
Pre-processing of shopping data was performed with WEKA data mining application tool (Bouckaert, Frank, Hall, Holmes, Pfahringer, Reutemann, & Witten, 2010). The numerical distribution of the baskets according to the size is shown in Figure 2. As you can see, the distributions are quite close to each other (221 short baskets, 217 middle baskets and 198 long baskets). The blue bar represents the middle basket, the red bar represents the long basket and the green bar represents the medium basket.
Figure 2. Number of transactions by length (number of market baskets).
Table 2. Fuzzy classification of baskets.
3. The Analysis of the Data
In our study, a second research question is to determine the preferences of customers for product categories. To answer this question, we introduced a new parameter, the ratio of each type of product in the basket (product type ratio).
We expressed the ratio of each product type in the basket with fuzzy values (Table 3).
In Figure 3, Fuzzy presentation of the product rates is given.
The quantitative ratios of the product types NB2, NB1, and BP are expressed in Figures 4(a)-(c).
It can be seen from Figure 4(a) that the ratio of NB2 group products in 117 baskets is low. In only 18 baskets, the rate of the NB2 group products was high (about 3%). In 501 baskets the proportion of NB2 products was low (about 70% of 600 purchases).
The number of baskets with a high rate of NB1products is only 18. At the same time, baskets with a low rate of the NB1 products are 158. The number of baskets with low rate of the NB1 type products is 482.
The number of baskets with a medium rate of BP type products is 351, at the same time, baskets with a high rate of the BP products are only 156. The number of baskets with a low rate of the product of BP type is 129.
In all graphics blue, red and green colors appropriately refer to short, medium, and long baskets.
As can be seen from the figure the ratio of product types in baskets does not vary significantly according to the long of baskets.
To answer the 3rd research question (Is there a relationship between the proportion of products in shopping basket and the number of baskets) fuzzy inference method was used.
By using of Weka application tool, on the basis of the results of the preprocessing fuzzy inference rules were created. The condition part of the rules are fuzzy variables representing the product type and the ratio of the product in the basket, and the conclusion part is the number of baskets that meet these conditions.
1) If Product Type is NB2 and the product rate in the baskets is “Low” then Number of the Baskets is “Lot”.
2) If Product Type is NB2 and the product rate in the baskets is “Medium” then Number of the Baskets is “Medium”.
Figure 3. Fuzzy presentation of the product rates (screenshot from FisPro application).
Figure 4. The number of baskets according to the type of product and the ratio of the product in the basket. (a) NB2 Type Product; (b) NB1 Type Product; (c) BP Type Product.
Table 3. Fuzzy rates of the product types in the baskets.
3) If Product Type is NB2 and the product rate in the baskets is “High” Then Number of the Baskets is “Low”.
4) If Product Type is NB1 and the product rate in the baskets is “Low” Then Number of the Baskets is “Lot”.
5) If Product Type is NB1 and the product rate in the baskets is “Medium” Then Number of the Baskets is “Medium”.
6) If Product Type is NB1 and the product rate in the baskets is “High” Then Number of the Baskets is “Low”.
7) If Product Type is BP and the product rate in the baskets is “Low” Then Number of the Baskets is “Medium”.
8) If Product Type is BP and the product rate in the baskets is “Medium” Then Number of the Baskets is “Lot”.
9) If Product Type is BP and the product rate in the baskets is “High” Then Number of the Baskets is “Medium”.
Fuzzy inference rules were run with FisPro application. Figure 5 shows the activation of the rules for the situation where the NB2 category products are at a moderate rate.
If the Product Type value is 4, 1 (it means that the product type is NB1, and the ratio of the NB1 is equal to 3, 8 (medium rate) then about 182 baskets will provide these conditions. More specifically, the proportion of products in the NB1 category was moderate in about 182 shopping transactions.
This analysis reveals the effect of product preferences on the number of purchases.
People usually do their daily shopping not from supermarkets but from small markets located near them. In this sense, people’s choice of supermarkets for which products is an important research subject in terms of determining the shopping strategy of the stores and managing the shopping. In this context, the analysis of the purchases made in a supermarket in a certain period has been made. Shopping transactions were examined in terms of product types, basket size, basket number and basket content. The analysis was carried out with data mining methods and fuzzy logic. As a result of literature research and interviews with potential customers, food products are divided into 3 categories according to their level of need and usefulness. Customers’ shopping preferences have been analyzed for these product categories.
Figure 5. Activation of fuzzy inference rules (screenshot from FisPro application).
The results of the study are thought to be useful in learning the customer profile and determining the shopping strategies of supermarkets.
Data collected in only one supermarket and in just one month limited the scope of the study. Using different market data over a larger time frame would provide more precise results. In our next studies, we aim to reveal more comprehensive research in terms of time and space.
 Bouckaert, R. R., Frank, E., Hall, M. A., Holmes, G., Pfahringer, B., Reutemann, P., & Witten, I. H. (2010). WEKA-Experiences with a Java Open-Source Project. Journal of Machine Learning Research, 11, 2533-2541.
 Boztug, Y., & Reutterer, T. (2008). A Combined Approach for Segment-Specific Market Basket Analysis. European Journal of Operational Research, 187, 294-312.
 Durdu, M. (2012). Application of Data Mining in Customer Relationship Management Market Basket Analysis in a Retailer Store. Master Thesis, Izmir: DokuzEylülUniversity, Institute of Natural Sciences.
 FisPro: An Open Source Portable Software for Fuzzy Inference Systems FisPro.
 Kurniawan, F., Hammad, J., Nugroho, S. M., & Hariadi, M. (2018). Market Basket Analysis to Identify Customer Behaviors by Way of Transaction Data. Knowledge Engineering and Data Science, 1, 20-25.
 Mangalampalli, A., & Pudi, V. (2012). FAR-Miner: A Fast and Efficient Algorithm for Fuzzy Association Rule Mining. International Journal of Business Intelligence and Data Minin, 7, 288-317.
 Musungwini, S., Zhou, T. G., Gumbo, R., & Mzikamwi, T. (2014). The Relationship between (4ps) & Market Basket Analysis. A Case Study of Grocery Retail Shops in Gweru Zimbabwe. International Journal of Scientific & Technology Research, 3, 258-264.
 Naranjo, R., Meco, A., Arroyo, J., & Santos, M. (2015). An Intelligent Trading System with Fuzzy Rules and Fuzzy Capital Management. International Journal of Intelligent Systems, 30, 963-983.
 Oglu, A. R. B., & Oglu, S. V. M. (2021). Estimation of Potential Locations of Trade Objects on the Basis of Fuzzy Set Theory. In C. Kahraman, S. CevikOnar, B. Oztaysi, I. Sari, S. Cebi, & A. Tolga (Eds.), Intelligent and Fuzzy Techniques: Smart and Innovative Solutions (pp. 228-237). INFUS-2020. Advances in Intelligent Systems and Computing, Vol. 1197, Cham: Springer.
 Othman, S., & Schneider, E. (2010). Decision Making Using Fuzzy Logic for Stock Trading. In Proceedings of 2010 International Symposium on Information Technology (pp. 1-6). Kuala Lumpur: Institute of Electrical and Electronics Engineers Inc.
 PhaniPrasad, J., & Mourya, M. (2013). A Study on Market Basket Analysis Using a Data Mining Algorithm. International Journal of Emerging Technology and Advanced Engineering, 3, 361-363.
 Tealab, A., Hefny, H., & Badr, A. (2017). Short-Term Stock Market Fuzzy Trading System with Fuzzy Capital Management. International Journal of Intelligent Engineering and Systems, 11, 49-58.
 Widiartha, K., & Dewi, D. (2019). Shopping Cart Analysis System in Product Layout Management with Apriori Algorithm. International Journal of Application Computer Science and Informatic Engineering, 1, 53-64.