Capstone Review 3
Capstone Review 3
Bachelor of Science
in
COMPUTER SCIENCE
by
BARATH.M (21BCS0035)
SRIRAM.B (21BCS0038)
APRIL, 2024
1
DECLARATION
I hereby declare that the thesis entitled “Product Recommendation Using Market Basket
Analysis” submitted by me, for the award of the degree of Bachelor of Science in Computer
Science to VIT is a record of bonafide work carried out by me under the supervision of a
Dr. Prabadevi.B.
I further declare that the work reported in this thesis has not been submitted and will not
be submitted, either in part or in full, for the award of any other degree or diploma in this
institute or any other institute or university.
Place : Vellore
Date : 24-04-2024
Signature of the Candidate
2
CERTIFICATE
The contents of this report have not been submitted and will not be submitted
either in part or in full, for the award of any other degree or diploma in this institute or
any other institute or university. The Project report fulfils the requirements and regulations
of
VELLORE INSTITUTE OF TECHNOLOGY, VELLORE and in my opinion meets the
necessary standards for submission.
3
ACKNOWLEDGEMENTS
It’s our pleasure to express with a deep sense of gratitude to Dr.Prabadevi B, SCORE,
Vellore Institute of Technology, for her constant guidance, continual encouragement, and
understanding; more than all, she taught patience in our endeavour. Our association with
her isnot Confined to academics only, but it is a great opportunity on my part to work with
an intellectual and expert in the field of Networking
BARATH.M
SRIRAM.B
4
ABSTRACT
In this era of digitisation, ecommerce sites are becoming more popular as most ofus prefer
online shopping because of it's flexibility and affordable prices. Also, in any ecommerce
site product recommendations are very crucial and are beneficial to various users
regarding choice of products to be purchased togetherwith better prices. Although many
techniques for market basket analysis (MBA) are prevailing in the literature but still lacks
efficiency. MBA is a data mining technique used to understand customers purchasing
patterns. It analysis large data sets, such as purchase history and to recommend products
to be purchased likely together. Product Recommendations Using MBA is used to gain
business insights used by e-commerce and retailers from the customer’s data. In this project
we analysis the existing methods and propose a new method for MBA. It adopts
association rule mining to recommend products that can be purchased together. It is used
to enhance user’s personalized experience in online shopping.
5
TABLE OF CONTENTS
LIST OF FIGURES……………………………………………....8
LIST OF TABLES…………………….........................................9
LIST OF ACRONYMS ………………………………………...10
CHAPTER 1:
INTRODUCTION
1.1Background…………………………………………………...11
1.2Objective……………………………………………………...11
1.4 Motivation…………………………........................................12
CHAPTER 2:
LITERATURE SURVEY
CHAPTER 3:
REQUIREMENTS
3.3 Budget………………………………………………………..23
CHAPTER 5:
IMPLEMENTATION AND DESIGN
CHAPTER 6:
RESULT
CHAPTER 7:
Conclusion…………………………………………………………64
CHAPTER 8:
References……………………………………................................65
7
LIST OF FIGURES
8
LIST OF TABLES
3.3.1 Budget………………………………………………………..23
9
LIST OF ACRONYMS
10
CHAPTER 1
INTRODUCTION
This chapter explains the introduction of the Market Basket Analysis.
1.1BACKGROUND
1.2 OBJECTIVE
Understanding Customer Purchasing Patterns: To analyze large datasets like
purchase history to reveal product groupings and identify items that tend to be
bought together.
Enhancing Sales: By recognizing patterns of co-occurrence, retailers canmake
informed decisions to optimize inventory management, devise effective marketing
strategies, employ cross-selling tactics, and even refinestore layout for improved
customer engagement.
Developing Effective Product Placement Strategies: To help sales and
marketing teams develop more effective product placement, pricing, cross-sell, and
up-sell tactics.
Increasing Customer Engagement: By identifying which items are frequently
purchased together, retailers can improve customer engagement and potentially
increase sales.
Optimizing Marketing Strategies and Campaigns: By understanding customer
behaviour, marketing teams can create more targeted and effective campaigns.
11
1.3 PROBLEM DEFINITION
1.4 MOTIVATION
Market basket analysis is not just about understanding what customers prefer to buy,
it’s about anticipating their behavior. By finding relationships between products frequently
purchased together, optimizing marketing efforts, and create a more personalized shopping
experience. It suggests items purchased together or improving store layouts, MBA
empowers retailers to make data-driven decisions to help the customers.
To put it simply, market basket analysis helps the retailers know about the products
frequently bought together so as to keep those items always available intheir inventory. The
source from which these patterns are found is the vast amountof data that is continually
collected and stored.
12
CHAPTER 2
LITERATURE SURVEY
This chapter highlighted the recently works in the Market Basket Analysis.
1) Badhe, V., Thakur, R. S., & Thakur, Profit Pattern Mining Using Soft Computing
for Decision Making : Problem of decision making is a crucial task in every business.
Profit Pattern Mining hit the target by minimizes the gap between statistical based pattern
generation and value base decision making. But this job is found very difficult when it
depends on the large, imprecise and vague environment, which isfrequentin recent years.
The concept of soft computing with data mining is novel way to address this difficulty. The
general approaches to association rule mining focus on inducting rule by using correlation
among data and finding frequent occurringpatterns. The major technique uses support and
confidence measures for generating rules which is not adequate nowadays as a measure of
interest, since the data have become more multifaceted these days, it's a necessary to find
solution that deals with such problem uses some new measures like profit, significance
etc. In this chapter, authors apply concept of pattern mining with vague set theory, Genetic
algorithm theory and related properties to the commercial management to deal with
business decision making problem.
2) Heydari, M., & Yousefli, A. (2017). A new optimization model for marketbasket
analysis with allocation considerations : Nowadays market basket analysis is one of the
interested research areas of the data mining that has received more attention by researchers.
But, most of the related research focused on the traditional and heuristic algorithms with
limited factors that are not the only influential factors of the basket market analysis. In this
paper to efficient modeling and analysis of the market basket data, the optimization model
is proposed with considering allocation parameter as one of the important and effectual
factors of the selling rate. The genetic algorithm approach is applied to solve the formulated
non-linear binary programming problem and a numerical example is used to illustrate the
presented model. The provided results reveal that the obtained solutions seem to be more
13
realistic and applicable.
3) Yun, C. H., Chuang, K. T., & Chen, M. S. (2006). Adherence clustering: an efficient
method for mining market-basket clusters : We explore in this paper the efficient
clustering of market-basket data. Differentfrom those of the traditional data, the features of
market-basket data are known to be of high dimensionality and sparsity. Without explicitly
considering the presence of the taxonomy, most prior efforts on clustering market-basket
data can be viewed as dealing with items in the leaf level of the taxonomy tree. Clustering
transactions across different levels of the taxonomy is of great importance for marketing
strategies as well as for the result representation of the clustering techniques for market-
basket data. In view of the features of market-basket data,we devise in this paper a novel
measurement, called the category-based adherence, and utilize this measurement to
perform the clustering. With this category-based adherence measurement, we develop an
efficient clustering algorithm, called algorithm k-todes, for market-basket data with the
objective to minimize the category-based adherence. The distance of an item to a given
cluster is defined as the number of links between this item and its nearest tode. The
category-based adherence of a transaction to a cluster is then defined as the average distance
of the items in this transaction to that cluster. A validation modelbased on information gain
is also devised to assess the quality of clustering for market-basket data. As validated by
both real and synthetic datasets, it is shown by our experimental results, with the taxonomy
information, algorithm k-todes devised in this paper significantly outperforms the prior
works in both the execution efficiency and the clustering quality as measured by
information gain,indicating the usefulness of category-based adherence in market-basket
data clustering.
4) Kaur, M., & Kang, S. (2016). Market Basket Analysis: Identify the changing trends
of market data using association rule mining : Market Basket Analysis(MBA) also
known as association rule learning or affinityanalysis, is a data mining technique that can
be used in various fields, such as marketing, bioinformatics, education field, nuclear
science etc. The main aim ofMBA in marketing is to provide the information to the retailer
to understand thepurchase behavior of the buyer, which can help the retailer in correct
14
decision making. There are various algorithms are available for performing MBA. The
existing algorithms work on static data and they do not capture changes in data with time.
But proposed algorithm not only mine static data but also provides a new way to take into
account changes happening in data. This paper discusses the data mining technique i.e.
association rule mining and provide a new algorithm which may helpful to examine the
customer behaviour and assists in increasing the sales.
6) Jirapatsil, P., & Phumchusri, N. (2022, April). Market basket analysis for fresh
products location improvement: Market Basket Analysis is like a detective tool for
finding out which products people buy together. It's useful for businesses like grocery
stores, online shops, and warehouses. If a company that sells fresh foods online. Right now,
they're not very efficient in how they arrange their products in their warehouse. This slows
down how quickly they can pack orders. So, we want to figure out a better way to organize
things in the warehouse by looking at past sales data. We used a special method called the
Apriori algorithm to study 2366 past orders from July to December 2021. Then, we used
what we learned to rearrange where products are stored in the warehouse. The result? We
found that we could reduce the average distance workers need to walk to pick items for
orders by 54.4%. That means things got much faster and easier for the workers.
15
7) Hilderman, R. J., Carter, C. L., Hamilton, H. J., & Cercone, N. (1998). Mining
market basket data using share measures and characterized itemsets: We introduce
the share-confidence framework for finding out useful information from databases,
specifically focusing on mining itemsets from market basket data. Our aim is twofold: (1)
to offer new ways of measuring itemsets that are practical and helpful instead of just using
the support measure; (2) to not only learn about what customers buy together but also to
understand different types of customers by dividing them into groups. We propose a new
method for sorting itemsets based on specific attributes we get from census or lifestyle
data. Our method uses a mix of the Apriori algorithm, which finds connections between
items in big databases, and the AOG algorithm, which groups data based on attributes. We
also explain how we can group itemsets based on concepts related to those attributes.
Lastly, we share results from experiments that show how effective the share-confidence
framework can.
16
places, make customers happier, and sell more.
9) Cavique, L. (2007). A scalable algorithm for the market basket analysis: Market
basket analysis is when we look at the things a customer buys together during one shopping
trip. It's really useful for stores to figure out how to sell more product to customers.
Especially in big stores with lots of items, finding out which items are bought together a
lot is important. Some methods to find these patterns can take a long time on the computer.
This paper is about a new way to find these patterns faster. Instead of looking at every
single item, we look at a simplified version of the data. We turn the problem into a different
kind of problem that's easier to solve quickly. We change the data into a kind of chart, and
then use a special method to find the most common groups of items. When we tested it out,
we found that our method can handle big sets of data really well and find patterns easily.
10) Boztuğ, Y., & Reutterer, T. (2008). A combined approach for segment- specific
market basket analysis: Market baskets Analysis comes from when people go shopping
and buy items from different categories that often go together. Analysis that explain how
people make choices across different categories of products consider these connections
between categories. These models usually look at how different types of marketing tactics
affect what people buy in specific categories. But they can only handle a small number of
categories, which is a problem for big stores with lots of items. So, for these big stores,
figuring out which categories should go together in shopping baskets has traditionally been
done by managers guessing. In this article, we suggest a different way. We combine models
that explain how people choose items from different categories with a method that looks at
actual shopping data. This method also considers that different customers like different
things. First, we simplify the data to find typical combinations of items that represent
different types of customers. Then, we use a special model to understand how different
types of shoppers choose items from different categories. In a real-life example, we found
that customers in different groups have different preferences for items, which can help
stores make better decisions about how to sell things.
17
11) Kim, H. K., Kim, J. K., & Chen, Q. Y. (2012). A product network analysis for
extending the market basket analysis. [11]: In this research, we introduce product
network analysis, a method that looks at how all products are connected in a network.
Unlike market basket analysis, which focuses on how products are related in individual
transactions, product network analysis takes a broader view of how all products are related
in a network. To do this, we create two types of networks: market basket networks and co-
purchased product networks. We compare these networks to understand their structure and
characteristics. Using this approach, we can better understandhow products are related to
each other and how they can be used for personalizedservices like cross-selling, upselling,
and displaying products tailored individual preferences
12) Nengsih, W. (2015, May). A comparative study on market basket analysis and
apriori association technique. [12]: Association Rules is a method in data mining that
helps us understand the relationship between different items. To create these rules and gain
new insights, we need to figure out how often certain items appear together. This is done
using algorithms like Apriori. This research looks at comparing two ways of doing market
basket analysis: one using the Apriori algorithm and one without any specific algorithm.
We compare how the rules are created, the process involved, and the rules we end up with.
We found that both methods have the same basic idea, but they go about creating the rules
differently. However, the rules themselves turn out to be quite similar in the end.
18
decision-making in various
industries. Future research could
further improve business decisions
using these methods.
19
consumer behavior and adapt to
evolving market trends effectively.
5 Using Association Shubhangi S. The paper investigates using
Rule Mining: Stock Umbarkar, S. association rule mining to predict
Market Events Nandgaonkar stock market events based on financial
Prediction from news, aiming to uncover patterns and
Financial News associations within the news that
could offer predictive insights for
investors.
6 Market basket Pattraporn The study focuses on utilizing market
analysis for fresh Jirapatsil, basket analysis to enhance the
products location Naragain placement of fresh products in retail
improvement Phumchusri settings. By analyzing purchasing
patterns and customer behavior, it
aims to optimize the location of fresh
products within stores, ultimately
improving sales and customer
satisfaction.
7 Mining market basket Hilderman, The paper introduces a method for
data using share Robert J., mining market basket data using share
measures and Colin L. measures and characterized item sets.
characterized item Carter, This approach focuses on analyzing
sets. Howard J. patterns of item sharing within market
Hamilton, and baskets to extract valuable insights for
Nick Cercone retail businesses efficiently.
8 Enhancing Customer H. J. V. L and The paper delves into the use of
Experience and Sales D. Rajan association rule mining to improve
Performance in a customer experience and sales
Retail Store Using performance in retail stores. It
Association Rule explores how analyzing transaction
Mining data can reveal patterns, leading to
20
informed decisions that enhance
customer satisfaction and increase
sales.
9 A scalable algorithm Cavique, Luis The paper presents a scalable
for the market basket algorithm tailored for market basket
analysis analysis, enabling efficient processing
of large volumes of transaction data to
uncover meaningful patterns and
associations between items purchased
together.
10 A combined approach Boztug, The paper outlines a combined
for segment-specific Yasemin, and approach tailored for segment-specific
market basket analysis Thomas market basket analysis. It integrates
Reutterer various techniques to analyze market
baskets, catering to specific segments,
thereby providing insights into
consumer behavior and preferences
within distinct market segments.
11 A product network Kim, Hyea The paper introduces "product
analysis for extending Kyeong, Jae network analysis" to expand market
the market basket Kyeong Kim, basket analysis by examining the
analysis and Qiu Yi connections among products in
Chen transaction data, offering insights into
consumer behavior in a more detailed
manner.
12 A comparative study Nengsih, The research paper conducts a
on market basket Warnia. comparative analysis of market basket
analysis and analysis and association techniques,
association technique exploring their effectiveness and
efficiency in extracting insights from
transactional data, particularly in retail
21
2.2 Challenges present in the existing system
Consumer Privacy and Consent: MBA involves collecting and analyzing large
volumes of consumer data. However, this raises ethical concerns related to
consumer privacy. Collecting data without explicit consent may also result in legal
challenges, violating data protection regulations.
Data Accuracy and Possible Errors: MBA relies on static data analysis, which
may not accurately capture fluctuations and changes over time. This limitation can
lead to errors in analysis, resulting in inaccurate predictions and potentially
misguided business strategies.
Interpretation Challenges: MBA generates association rules, but interpreting
these rules and translating them into actionable strategies can be complex.
Businesses need to bridge the gap between data insights and practical decision-
making
Resource-Intensive Data Volume: MBA deals with large volumes of transaction
data, which can be resource-intensive to manage and analyse. Retailers must invest
in robust infrastructure and efficient data processing methods to handle this scale.
Privacy Concerns: With increasing awareness of data privacy, retailers must
handle customer data responsibly and transparently. Ensuring compliance with
privacy regulations is crucial to maintaining consumer trust.
22
CHAPTER 3
REQUIREMENTS
This chapter gives the requirements needed for implementing the proposed
system
RAM: 6GB
3.3 Budget:
Table 3.3.1 Budget
Laptop 60,000
Internet 1000
23
3.4 Gantt Chart:
3. Creating the project using python and Machine learning part of the
the open library ie..open cv,pandas project was implemented
24
CHAPTER 4
This chapter explains the analysis and designs in the Market Basket Analysis.
Market basket analysis is a crucial tool for e-commerce websites, offering significant
benefits in enhancing customer experience, optimizing sales, and improving overall
business performance. This analysis is based on the principle that items bought together in
the past are likely to be purchased together in the future, allowing businesses to identify
patterns and relationships between different products. By One of the primary applications
of market basket analysis in e-commerce is product placement. By identifying products
that are frequently purchased together, e-commerce websites can arrange these items on
the same product page or in close to each other. This encourages customers to purchase
both items, potentially increasing the overall value of each transaction.
25
4.2 System architecture:
26
4.2.1 Block Diagram:
27
4.3 Module Description:
MBA is widely used in the retail and e-commerce industries to optimize product
assortments. It helps businesses identify popular product combinations, suggest
complementary items, and create targeted promotions to increase sales and customer
satisfaction. For example, by assessing the purchasing associations between a particular
line of high-end cabinets and an upsell organization feature, businesses can work to cross-
sell these enhancements during the client consultation.
By identifying which items are frequently purchased together, companies can optimize
their inventory management, identify product bundling opportunities, and improve overall
sales. This not only enhances the shopping experience for customers but also leads to
increased sales and customer satisfaction.
The final step of market basket analysis involves interpreting the generated rules and
deriving meaningful insights and recommendations. These insights can help businesses
understand customer behaviour, identify product associations, optimize pricing and
promotions, enhance cross-selling and upselling strategies, and improve overall business
performance.
28
Implementing Actionable Insights:
Implementing market basket analysis is not just about generating association rules but also
about deriving actionable insights. Carefully interpreting the results to gain meaningful
insights into customer behaviour and preferences allows businesses to identify patterns that
can be translated into tangible actions—such as cross-selling opportunities, targeted
promotions, or product placement optimizations. Collaborating with relevant stakeholders,
such as marketing and merchandising teams, to translate insights into actionable strategies
and campaigns is crucial.
29
CHAPTER 5
We use datasets of Amazon, Flipkart and Big basket to analyse the customer purchasing
patterns. These datasets provide a foundation for analyzing customer purchase patterns and
enhancing online shopping experiences by suggesting products that customers might buy
together. Eg: IF bread is bought, THEN milk is likely bought together. So This project also
suggests milk, jam if bread is searched by user.
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
INDEX PAGE CODE:
50
LOGIN PAGE CODE:
51
52
RECOMMEND PAGE CODE:
53
APP.PY CODE:
54
5.2 Sample output:
55
56
57
58
59
60
5.4 Test Plan & Data Verification
TEST TEST CASE TEST CASE TEST CASE EXPECTED ACTUA STATUS
CASE TITLE DESCRIPTIO STEPS RESULT L
ID N RESULT
61
in bar
chart
62
CHAPTER 6
RESULT
This chapter highlighted the overall result of the Market Basket Analysis.
MBA can provide valuable insights when combined with qualitative research methods:
MBA uncovers patterns in transactional data (such as frequently purchased products),
which can be validated through qualitative research techniques like interviews or surveys1.
Understanding customer behaviour is essential for targeted marketing, product
development, customer satisfaction, and gaining a competitive edge in the dynamic
marketplace. By mastering the findings, businesses can craft effective strategies and
enhance their sales and marketing programs
Market Basket Analysis (MBA) is a data mining technique that helps retailers and e-
commerce platforms understand customer purchasing patterns by analyzing transactional
data to identify product groupings and items likely to be bought together. it provides
valuable insights, especially when combined with qualitative research for quantitative
confirmation. When complemented with qualitative research, MBA offers a
comprehensive view of customer preferences, enabling e-commerce platforms to provide
personalized recommendations and improve the shopping experience.
63
CONCLUSION
64
REFERENCES
[1] Badhe, V., Thakur, R. S., & Thakur, G. S. (2017). Profit Pattern Mining Using Soft
Computing for Decision Making: Pattern Mining Using Vague Set and Genetic
Algorithm. In Pattern and Data Analysis in Healthcare Settings (pp. 213-239). IGI
Global.
[2] Heydari, M., & Yousefli, A. (2017). A new optimization model for market basket
analysis with allocation considerations: A genetic algorithm solution approach.
Management & Marketing. Challenges for the Knowledge Society, 12(1), 1-11.
[3] Yun, C. H., Chuang, K. T., & Chen, M. S. (2006). Adherence clustering: an efficient
method for mining market-basket clusters. Information systems, 31(3), 170-186.
[4] Kaur, M., & Kang, S. (2016). Market Basket Analysis: Identify the changing trends of
market data using association rule mining. Procedia computer science, 85, 78-85.
[5] Umbarkar, S. S., & Nandgaonkar, P. S. S. (2015). Using association rule mining: stock
market events prediction from financial news. Int J Sci Res (IJSR), 4, 1958-1963.
[6] Jirapatsil, P., & Phumchusri, N. (2022, April). Market basket analysis for fresh
products location improvement: A case study of E-commerce business warehouse. In
Proceedings of the 4th International Conference on Management Science and
Industrial Engineering (pp. 23-28).
[7] Hilderman, R. J., Carter, C. L., Hamilton, H. J., & Cercone, N. (1998). Mining market
basket data using share measures and characterized itemsets. In Research and
Development in Knowledge Discovery and Data Mining: Second Pacific-Asia
Conference, PAKDD-98 Melbourne, Australia, April 15–17, 1998 Proceedings 2 (pp.
159-173). Springer BerlinHeidelberg.
[8] Rajan, D. (2023, July). Enhancing Customer Experience and Sales Performance in a
Retail Store Using Association Rule Mining and MarketBasket Analysis. In 2023 14th
International Conference on Computing Communication and Networking Technologies
(ICCCNT) (pp. 1-5). IEEE.
[9] Cavique, L. (2007). A scalable algorithm for the market basket analysis. Journal of
Retailing and Consumer Services, 14(6), 400-407.
[10] Boztuğ, Y., & Reutterer, T. (2008). A combined approach for segment- specific
65
market basket analysis. European Journal of Operational Research, 187(1), 294-312.
[11] Kim, H. K., Kim, J. K., & Chen, Q. Y. (2012). A product network analysis for
extending the market basket analysis. Expert Systems with Applications, 39(8), 7403-
7410.
[12] Nengsih, W. (2015, May). A comparative study on market basket analysisand apriori
association technique. In 2015 3rd international conference on information and
communication technology (ICoICT) (pp. 461-464).IEE
66
THANK YOU
67