Analysis of Food Shopping Baskets in a Supermarket in Terms of Different Parameters Using Fuzzy Logic

The aim of this study is to investigate how people’s consumption needs 
are reflected in market baskets. Food products baskets in a large shopping center were examined in terms of different 
parameters such as the amount of purchasing product (size of the basket), the 
types of products and the proportion of 
the product types in the basket. Relationships between analysis parameters are 
expressed by fuzzy inference rules.


Introduction
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 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;  Fruit;  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: 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.

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.
Fuzzy Rules: 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". Open Journal of Business and Management  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.

Conclusion
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. 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.

Conflicts of Interest
The author declares no conflicts of interest regarding the publication of this paper.