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

Abstract

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.

Share and Cite:

Salahli, V. (2020) Analysis of Food Shopping Baskets in a Supermarket in Terms of Different Parameters Using Fuzzy Logic. Open Journal of Business and Management, 8, 2195-2204. doi: 10.4236/ojbm.2020.85134.

1. 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 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;

• 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:

Figure 1. Fuzzy presentation of the product categories (screenshot).

Table 1. Food categories.

μ n o n b a s i c 1 ( x ) = { 0 , x < 2 x 2 4 2 , 2 x 4 1 , 4 x 5 x 7 5 7 , 5 x 7 0 , x > 7

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.

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

Figure 3. Fuzzy presentation of the product rates (screenshot from FisPro application).

(a)(b)(c)

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.

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

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.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Adali, G. K., & Balaban, M. E. (2019). A Dynamic Application of Market Basket Analysis with R and Shiny in the Electric Materials Sector. BilisimTeknolojileriDergisi, 12, 93-102.
[2] Aguinis, H., Forcum, L., & Joo, H. (2013). Using Market Basket Analysis in Management Research. Journal of Management, 39, 1799-1824.
https://doi.org/10.1177/0149206312466147
[3] 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.
[4] Boztug, Y., & Reutterer, T. (2008). A Combined Approach for Segment-Specific Market Basket Analysis. European Journal of Operational Research, 187, 294-312.
https://doi.org/10.1016/j.ejor.2007.03.001
[5] Cheung, W. M., & Kaymak, U. (2007). A Fuzzy Logic-Based Trading System. In Proceedings of the Third European Symposium on Nature Inspired Smart Information Systems (pp. 33-45). Malta.
[6] 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.
[7] FisPro: An Open Source Portable Software for Fuzzy Inference Systems FisPro.
https://www.fispro.org/download/documentation/fispro36inline.pdf
[8] Intan, R. (2006). A Proposal of Fuzzy Multidimensional Association Rules. Journal Informatika, 7, 85-90.
[9] 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.
https://doi.org/10.17977/um018v1i12018p20-25
[10] Lekha, A., Srikrishna, C. V., & Vinod, V. (2015). Fuzzy Association Rule Mining. Journal of Computer Science, 11, 71-74.
https://doi.org/10.3844/jcssp.2015.71.74
[11] List of Foods.
https://en.wikipedia.org/wiki/Lists_of_foods
[12] 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.
https://doi.org/10.1504/IJBIDM.2012.051714
[13] 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.
[14] 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.
https://doi.org/10.1002/int.21734
[15] 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.
https://doi.org/10.1007/978-3-030-51156-2_28
[16] 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.
https://doi.org/10.1109/ITSIM.2010.5561564
https://www.researchgate.net/publication/251944336_Decision_making_using_fuzzy_ logic_for_stock_trading
[17] 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.
http://www.ijetae.com
[18] Sarada, W., & Kumar, P. V. (2019). Realizing Behavioral Patterns Using Fuzzy Logic in Market Basket Analysis. International Journal of Engineering Research & Technology, 8, 574-577.
[19] 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.
https://doi.org/10.22266/ijies2018.0630.06
[20] What Are the Basic Food Groups?
https://www1.health.gov.au/internet/publications/publishing.nsf/Content/gug-family-toc~gug-family-foods~gug-family-foods-basic
[21] 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.

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.