Implying Association Rule Mining and Market Basket Analysis for Knowing Consumer Behavior and Buying Pattern in Lockdown-A Data Mining Approach

Buyer practices have changed as individuals are figuring out how to live with the new truth of COVID-19. Take-out and conveyance orders have expanded, and our customer has added new items to their menu because of new client inclinations. With every one of the continuous changes, the customer had numerous unanswered inquiries, for example, Smartbridge has broad involvement with café innovation development Café TECHNOLOGY CAPABILITIES :Are the most famous items as yet unchanged after COVID? :Which are the most sold item blends now? :What is the acknowledgment of new things? :What are clients purchasing alongside new things? :How have liquor deals changed? The customer previously had reports that followed item deals and operational measurements, notwithstanding, there was a need to get a more profound knowledge into item examination. The customer expected to recognize what items and introductions were being sold all the more frequently, measure the acknowledgment of new items, and figure out what items clients buy together to improve advertising efforts, advancements, and deals. he E-business industry is filling immensely in the Indian market. The modest 4G web bundles in India clearly gives a push to these ventures. Thus, as Covid19 first hit in Quite a while, individuals got terrified to go out from their homes in light of the fact that, in their mind, it's a dread of Covid. They even wonder whether or not to go out to purchase fundamental (FMCG) products. Frenzy purchasing additionally has seen and to stay away from this dread of COVID-19, individuals are offering inclinations to the E-Commerce destinations to purchase fundamental products and a few clients are new which joined to purchase fundamental merchandise during this Pandemic Lockdown period. Numerous clients are moving their purchasing conduct from disconnected retail locations to online stores. This paper examines the customer buying pattern during lockdown.


I. Introduction
Shopper conduct is a customer movement in choosing to buy, use, just as burn-through the bought labor and products remembering for the client factors which can give an ascent to their choices regardless of whether to buy and utilize items. Each client have various necessities and tendencies too as have various practices in satisfying those things. Notwithstanding, in case of various practices to satisfy their requirements, they actually share a few similitudes, one of them is craving to expand their fulfillments in devouring a vital item or administration. Of that utilization action, that can be surmised concerning the conduct, example, or propensity that the clients do in satisfying their necessities and wants. That conduct can be distinguished via the logging did by the go-between supplier of purchaser needs (grocery store).
The logging is brought off considering the imperative of documentation and history information recognizable proof over the conveying out of exchange action. In these new years, exchange information have been regularly utilized as examination and investigation objects for scientists. In this investigation, additionally, exchange information are to be re-prepared/re-investigated to produce more important data. For example, data of a thing whose deals is the most noteworthy. Additionally, data can be used in respect with the stock expansion of that thing. Besides, from exchange information there can be used concerning the connection of each bought thing inside the client' bushel. By that data, we can utilize it for viable item show/arrangement to draw in clients' interest. The ordinarily utilized application to break down exchange information clients' shopping bushel is market bushel examination. Market bushel examination is one of the modes from information mining method predominantly utilized to break down things/merchandise in at least one shopping bushels that a client has in one specific second Exchange information is a bunch of recording information bring about associations with deals buy exercises at a specific organization. In these new years, exchange information has been predominantly utilized as exploration objects in methods for finding new data. One of the potential endeavors is to plan an application that can be utilized to dissect the current exchange information. That application has the nature of market bin investigation. In expansion, the application is intended to be work area based whose segments are capable to measure just as re-log the current exchange information. The pre-owned strategy in planning this application is via following the current strides on information mining method. The preliminary outcome showed that the turn of events and the execution of market crate investigation application through affiliation rule technique utilizing apriori calculation could function admirably. With the methods for certainty worth of 46.69% and backing worth of 1.78%, also, the measure of the produced rule was 30 standards.
The additional time and cash devouring cycle in retail industry is extracting more valuable data from retail location data set, to acquire cutthroat advantage. India is a market zone which contains gigantic number Kirana and frivolous shops and huge number of retail locations what's more, grocery stores. In this examination an endeavor has been made through strategically pitching investigation to distinguish the relationship among items and to recommend essential item advancement methodologies. Likewise utilizing this examination, the client inclinations and purchasing behavior have been concentrated to propose item situating to improve the deals. The result of the investigation can be utilized for valuing.

A. Market Basket Analysis
Market Basket Analysis is an investigation mode performed on client conduct while shopping at a grocery store through the methods distinguishing affiliation and associations among different things put by the clients in their shopping bins [2]. In explicit, Market Basket Analysis focuses on all the while distinguishing the most oftentimes bought things by clients. Here, thing is portrayed as a few sorts of items in grocery store. Utilizing market bin examination mode, an information on what are the things oftenly bought by the clients all the while and having a chance to be advanced can be gotten. Concerning the target of market container examination mode to choose which items that clients buy at the same time, whereby the name of this mode is taken from the conduct of the clients in setting shopping items into their shopping containers or shopping list. Over recognizing shopping bin example of a client can altogether help an organization in utilizing that data in regard of business system needs, one of them is setting the most oftentimes bought items all the while into one explicit territory.

B. Association Rule
Association rule is identified with the assertion of "what' with what". This matter can be in a type of explanation on exchange movement completed by the clients at a store. From that assertion, there has a solid connection to the investigation of client exchange inf for a bought item with what item, hence, affiliation rule is as often as possible alluded as market bin investigation [1], [2]. The meaning of an acquainted principle can be figured within the sight of two boundaries, to be specific backing and certainty. Backing (supporting worth) is the level of blends of item things in the data set. While certainty (assurance esteem) is a worth to decide the strength of between thing connections in affiliation rules.

C. Customer Behaviour
Definition of customer behavior is a dynamic interaction between cognition, affection, behavior, and its environment whereby someone performs exchange activities in their regular basis [3]. In view of this statement, there are three significa 1. Customer behavior bears dynamic characteristic, thus, hard to predict.
2. Involving interaction, like cognition, affection, behavior, and the occurrences around customers, 3. Involving exchange, like the exchange of item and money from merchant to customer Four factors that could give a rise to customer purchase in shopping Over recognizing shopping bin example of a client can altogether help an organization in utilizing that data in regard of business system needs, one of them is setting the most oftentimes bought items all icit territory.
rule is identified with the assertion of "what' with what". This matter can be in a type of explanation on exchange movement completed by the clients at a store. From that assertion, there has a solid connection to the investigation of client exchange information data set to decide the propensity for a bought item with what item, hence, affiliation rule is as often as possible alluded as market bin investigation [1], [2]. The meaning of an acquainted principle can be figured within the sight of two ies, to be specific backing and certainty. Backing (supporting worth) is the level of blends of item things in the data set. While certainty (assurance esteem) is a worth to decide the strength of between thing connections in affiliation rules.
Definition of customer behavior is a dynamic interaction between cognition, affection, behavior, and its environment whereby someone performs exchange activities in their regular basis [3]. In view of this statement, there are three significant matters to grasp, namely: 1. Customer behavior bears dynamic characteristic, thus, hard to predict.
2. Involving interaction, like cognition, affection, behavior, and the occurrences around customers, 3. Involving exchange, like the exchange of item and money from merchant to customer Four factors that could give a rise to customer purchase in shopping.
Over recognizing shopping bin example of a client can altogether help an organization in utilizing that data in regard of business system needs, one of them is setting the most oftentimes bought items all rule is identified with the assertion of "what' with what". This matter can be in a type of explanation on exchange movement completed by the clients at a store. From that assertion, there has ormation data set to decide the propensity for a bought item with what item, hence, affiliation rule is as often as possible alluded as market bin investigation [1], [2]. The meaning of an acquainted principle can be figured within the sight of two ies, to be specific backing and certainty. Backing (supporting worth) is the level of blends of item things in the data set. While certainty (assurance esteem) is a worth to decide the strength of Definition of customer behavior is a dynamic interaction between cognition, affection, behavior, and its environment whereby someone performs exchange activities in their regular basis [3]. In view of 2. Involving interaction, like cognition, affection, behavior, and the occurrences around customers, There were three variables that must be regarded in understanding customer behavior, namely stimulus variable, response variable, and intervening variable

Data Mining
The researcher argued that Data Mining had garnered the interest of information industry and public during in that recent years, this was brought about by massive data availability and the necessities to render information data to usable knowledge [6], [7]. Data Mining is prevalently depicted as retrieval pattern on a large set of crude data so that some unveiled knowledge in the data can be found. Data Mining is considered a major step in the process of knowledge retrieval in the database. Data Mining inherits many aspects and techniques from established fields of science first. Data Mining also has long roots from fields such as artificial intelligence (Artificial Intelligent), machine learning, statistics, database and also information retrieval.

Apriori Algorithm
Apriori is a powerful calculation utilized for mining the itemsets and use of affiliation rules on the conditional data sets. The affiliation rules controlled by Apriori feature the general pattern in retail location data set. The Key issue in the retail area is to discover helpful covered up designs for business application. Apriori are designednto work on data set containing exchanges (the assortment of things by faithful customers).When incessant thing sets are shown up at the affiliation rules are shaped with certainty bigger than or equivalent to a client characterized least certainty. Items are the elements that we are distinguishing connection between. A gathering of items is called a thing set. The yield of a strategically pitching examination is essentially a bunch of rules, that assist us with making business choices. (For example Showcasing, Product Assortment). Support : Percentage or absolute numberof exchanges that contain the entirety of the things in a thing set (e.g., espresso powder,milk and sugar).The rules with high help, will be appropriate to an enormous number of exchanges. E.g., Retail general store is probably going to include fundamental items, for example, espresso powder, milk& sugar that are mainstream across a whole clients. If there should be an occurrence of Electronics things, like printer toner, might not have items with a high help, on the grounds that every client as it were purchases toner for their own utilization and it requires some investment to supplant.
Confidence: Probability that an exchange that contains the things on the LHS of the standard (espresso powder, milk) likewise contains the thing on the RHS (sugar).Higher certainty esteem infers more noteworthy that the thing on the correct hand side will be bought.
Lift: Probability of the entirety of the things in a standard buying together (otherwise called the help) separated by the result of the probabilities of the things on the LHS and RHS happening as though there was no connection between them. For instance, if espresso powder, milk and sugar happened together in 3.5% of all exchanges, espresso powder and milk in 20% of exchanges and sugar in 6% of exchanges, at that point the lift would be: 0.035/(0.2*0.06) = 2.917. A lift of mutiple proposes that the presence of espresso powder and milk expands the likelihood that a sugar will additionally happen in the exchange. All in all, lift tells about the strength of relationship between the items on the LHS of the standard; bigger lift esteem infers the more noteworthy connection between two items.

Background 5 Critical Ways the Pandemic is Changing Consumer Preferences
Change is hard, ordinarily. A great many people won't change since a long time ago held mentalities, propensities, or inclinations -except if they must choose between limited options. Also, that is the thing that occurred in the previous few months. The Coronavirus pandemic prompted far reaching social separating and sanctuary set up standards, upsetting stocks, deals, and supply chains -and subsequently, shopper buy designs. Brands and retailers mixed to enhance stock and reevaluate conveyance. In the interim, shoppers everywhere on the world had auto-left on perhaps the main mass changes in current history. For the most recent decade at Course5 Intelligence, we have been observing and empowering worldwide customers, and intently following shopper experiences utilizing our Audience Graph arrangement [A worldwide large scale and miniature fragments checking stage at scale]. We found that customers are developing as time passes of the pandemic, moving from a demeanor of abdication in the underlying weeks to a resurging office lately. Then, something changed unalterably. The shopper experienced and acknowledged essential necessities, new items, an adjusted way of life, and new mentalities to life. Brands need to comprehend these progressions to have the option to oblige and interface with the late -and post-pandemic buyer. Here are a portion of the basic ways the pandemic has influenced shopper inclinations up to this point -

Affinity vs. Availability -
Across groceries, home cleaning products, and other essentials of daily life, consumers found that the brands they loved, preferred, or were accustomed to, were often out of stock and inevitably started using brands that were on the shelf. In many cases, the new brands have stuck.
Over ~35% of consumers said they would continue to buy new products they started using during the crisis.Consumers who shopped online for the first time or shopped more extensively online during the pandemic mostly said this would continue to do so for at least some of the purchases that were previously offline.One brand's (or shopping outlet/platform's) loss is another brand's gain. Both brands that lost and gained customers during the pandemic will need to understand and address consumers very carefully in the coming months to either hold on to newly acquired customers or woo back old ones.

Localism -
With restricted global movement and a sharp urge for self-preservation in the rapids of the pandemic, consumers globally started falling back on their local communities and championing local produce. The trend could mean consumers opting for products made locally and buying from community stores. The takeaway for brands here is to highlight their local connection and community engagement in meaningful and resonant ways. In the coming months, brands will need to follow consumer sentiment carefully as they make production and marketing decisions. Brands would need to look at their entire supply chains and marketing value chains to reach out to more local and microcommunities rather than focussing on national or a broader ecosystems. The better brands than can address exact consumer needs, the better their chances of winning consumers' hearts. As Zig Zagler said, "People don't buy for logical reasons. They buy for emotional reasons." More or less.

Safety Over Comfort -
Safety has been one of the biggest concerns on consumers' minds in the past few months, and continues to remain so. Critical trends in the safety needs based on our 'Audience Graph' -(a) shopping at local stores, (b) choosing to go to a superstore optimized for social distancing to complete all purchases at one go, (c) making purchases online (d) opting for contactless delivery -are some of the critical micro trends that we predict will continue in the foreseeable future.

Consumer Preferences in Pandemic
As a brand or shopping outlet, this means you need to optimize your business model for safety and communicate the measures you have taken to your target customers.In our recent Compass Virtual (Digital) Conference, Alex Robertson shared: when David's Bridal reopens: (a) they will be sanitizing outlets regularly (b) meeting clients by appointment only, and (c) organizing home trials in addition to shifting parts of the purchase cycle online.
In short, doing everything they can to assuage customers' fears and ensure a safe shopping experience. From taking up some form of indoor or socially distanced fitness routine to home-cooking healthy meals to overall slowing down and reconsidering life priorities, consumers have distinctly become more health-conscious. More than ever, they carefully examine their product and lifestyle choices in the context of their health goals.

Prioritizing Health -
Socially distanced fitness routineIt is increasingly crucial for brands to support healthy lifestyles for their customers and employees, stay carefully tuned to the apprehensions of consumers, and find ways to assure safety. Having a 'health strategy' will be a strategic differentiator for brands in the foreseeable future.

Patience and Value-Consciousness -
Consumers amid a lockdown and economic uncertainty are turning both more patient and more demanding at the same time. They are patient with delivery delays and logistical inconveniences, but they are more demanding in terms of quality and the value they are getting for their money. A growing number of consumers say "price matters" and may matter even more in the coming months if the economy worsens.Many consumers expect brands to help them by offering discounts and promotions. Brands will need to explore new ways to enable this. Sarda Farms, a local Milk supplier in India, changed its packaging to cut costs, which, in turn, lowered the price of milk. Similarly, technology companies offering their solutions free or at highly discounted rates to students, universities, and business organizations right now which would help these users adopt their solutions and price would not be a hindrance later.
Consumers say price matters-One of the trends accelerated by the current pandemic is also a rise in mindful consumption. Consumers are more attentive to what they're buying, and strive to limit food waste, shop more cost consciously and buy more sustainable options. Brands will need to weave one or more of these considerations prominently into their offerings.These are some of the trends we can see and predict for now. But just as the pandemic situation remains in flux, consumer preferences will continue to change and evolve in the next 12-18 months. These are crucial habit-forming months for consumers, and brands will do well to continuously monitor consumer sensibilities and adapt their offerings to provide maximum comfort and utility in challenging times.

UNDERSTANDING CONSUMER BEHAVIOR: MARKET BASKET ANALYSIS
In the examination space, we call these retail shopping events market bins. They comprise of blends of items or potentially benefits that a customer may buy together. In the model over, the guarantee, the holster and the charger go with the telephone into the bin. In an eatery, some espresso may supplement the cake. Furthermore, in an auto assistance station, a tire pivot might be important for a similar container as an oil change. Market bushel examination considers mixes of purchased together things to give the correct items to the perfect client at the perfect time. The key is recognizing the buy designs, deciding those patterns that are of worth and introducing those items in an effectively available style. These affinities can be utilized to improve efficiencies and primary concern productivity. Extra proposals, strategically pitching, couponing and advancements give further freedoms to expand income.
An early illustration of this is the legend of lager and diapers, broadly revealed about twenty years prior. In 1998, Forbes magazine summed up as follows: "A corporate store put all its checkoutcounter information into a goliath advanced distribution center and set the circle drives turning. Out popped a most unforeseen relationship: deals of diapers and brew. Clearly, youthful dads would make a late-night race to the store to get Pampers and get some Bud Light while they were there. Benefiting from the disclosure, the store put the divergent things together. Deals zoomed." In this way, we witness one more use of market bin examination: arrangement of items inside a retail, or so far as that is concerned, advanced stag Also, the hidden proposition in the investigation is that in the event that we can distinguish bunches of items that are purchased together, we can use that data by offering different things that are related with what was simply bought. This examination is frequently utilized by internet business locales to offer buy ideas to purchasers. For instance, when an individual purchases toothpaste, the retailer may propose different items like a toothbrush, mouthwash, flossing supplies, and so forth This is because of the predominance with which different customers purchased these things in a similar exchange as the toothpaste.
Sounds consistent, isn't that right? However it's not generally direct. For huge firms, the sheer number of blends can be overpowering -effectively ascending into the billions, making a logical bad dream. Notwithstanding, there are instruments and approaches that make market bushel more reasonable and helpful. A few specialists use affiliation examination to look through the different item exchange mixes. Integral to this methodology are two basic inquiries that should be brought up in analyzing market bushels. These are: Which level of the time are items X and Y found in a similar market crate?
Given that a shopper buys item X, what is the likelihood that he will likewise buy item Y?
How about we attempt to explain these issues, and afterward give the classification that is ordinarily utilized to allude to every one of these ideas. Take a gander at the graph underneath, which addresses eight exchanges arising out of a book shop's information stockroom. They could be a physical retailer or an online business one. It records the containers of eight clients, with a limit of five things (books) bo Obviously, a similar methodology can be utilized to address every one of the mixes that are of interest. The primary passage, the recurrence of the event, is assigned as the "support". The last passage portrays what specialists allude to as the "certainty".
Directors utilize an assortment of measurements to check the strength of any found connections. For instance, expect that, in the wake of looking at our book retailer's exchanges, we notice that 6% of the multitude of bushels contain Technology as a bought classification. Advertisers are generally keen on introducing this class of book to their crowd. How would it be a good idea for them to respond? Whom will they target? Upon additional information examination, they see that 18% of the individuals who have purchased History likewise bought Technology. Amazing! That is a 300% improvement (18%/6%). This 300% estimation is alluded to as "lift." The investigation likewise shows that among those that had Fiction in their bushels, just 4% bought Technology. This addresses a 66% lift (4%/6%). Plainly, the retailer would consider utilizing History as a trigger to rouse Technology buys, instead of Fiction. The following is a visual rundown.ught for every one of these people.

Transactions
"So, what?" you might ask. You're showing me two products. It doesn't appear to be that complicated. Analysts are evaluating multiple above, one who purchases Health andDrama categories has his basket. Only customer 277 fulfills this rule (one basket out of eight is 12.5%).The fact is that market baskets may well differ by age, gender, occupation, etc. This doesn't present any problem all you need to do is incorporate it into the analysis. I have often found that this extra level of analysis provides a more insightful view of the customer journey. If we want to take this one step further, we can add yet another dimension: the time element.Let's return the relationships of the various products in the baskets. Recall that we concluded that, for example, Mystery was linked with Drama. A reasonable issue to examine is which one arrived in the market basket first. Was it Mystery or was it Drama? The purchase sequence can influence the tactics employed by the marketer. If many or all customers buy Drama before Mystery, that may provide the retailer with guidance about selling the subsequent product. Various cross implemented.To address the above sequence issue, we can incorporate a time factor into the data analysis. An ensuing conclusion may be the following: Customers who have bought a Mystery novel are 4 times as likely to buy an audiobook always that clear. Sequence analysis provides a means to identify such rules, no matter how obscure they may be in your data.Market-basket type analysis can be extended to a host of different settings Think of a physician confronted with a patient with multiple health issues. These health issues usually precede a more serious condition. Thus, the basket defined by the initial health problems may often be combined with the more serious event, enabling Focusing in on which of these events occur together may assist in discerning patterns and correlations between individuals and a host of diverse actions. Transactions at a bookseller "So, what?" you might ask. You're showing me two products. It doesn't appear to be that complicated. Analysts are evaluating multiple-product baskets. Referring to the transaction record above, one who purchases Health andDrama categories has a 12.5% probability of adding History to his basket. Only customer 277 fulfills this rule (one basket out of eight is 12.5%).The fact is that market baskets may well differ by age, gender, occupation, etc. This doesn't present any problem do is incorporate it into the analysis. I have often found that this extra level of analysis provides a more insightful view of the customer journey. If we want to take this one step further, we can add yet another dimension: the time element.Let's return to our illustration. We briefly discussed the relationships of the various products in the baskets. Recall that we concluded that, for example, Mystery was linked with Drama. A reasonable issue to examine is which one arrived in the market as it Mystery or was it Drama? The purchase sequence can influence the tactics employed by the marketer. If many or all customers buy Drama before Mystery, that may provide the retailer with guidance about selling the subsequent product. Various cross-selling strategies can be implemented.To address the above sequence issue, we can incorporate a time factor into the data analysis. An ensuing conclusion may be the following: Customers who have bought a Mystery novel are 4 times as likely to buy an audiobook reader within 3 months.Sequence rules, however, are not always that clear. Sequence analysis provides a means to identify such rules, no matter how obscure basket type analysis can be extended to a host of different settings Think of a physician confronted with a patient with multiple health issues. These health issues usually precede a more serious condition. Thus, the basket defined by the initial health problems may often be combined with the more serious event, enabling the physician to proactively treat the patient. Focusing in on which of these events occur together may assist in discerning patterns and correlations between individuals and a host of diverse actions.

Second Book
Third Book Action Drama Drama History Biography Drama Drama Fiction Politics Travel History "So, what?" you might ask. You're showing me two products. It doesn't appear to be that product baskets. Referring to the transaction record a 12.5% probability of adding History to his basket. Only customer 277 fulfills this rule (one basket out of eight is 12.5%).The fact is that market baskets may well differ by age, gender, occupation, etc. This doesn't present any problemdo is incorporate it into the analysis. I have often found that this extra level of analysis provides a more insightful view of the customer journey. If we want to take this one step further, we to our illustration. We briefly discussed the relationships of the various products in the baskets. Recall that we concluded that, for example, Mystery was linked with Drama. A reasonable issue to examine is which one arrived in the market as it Mystery or was it Drama? The purchase sequence can influence the tactics employed by the marketer. If many or all customers buy Drama before Mystery, that may provide the ing strategies can be implemented.To address the above sequence issue, we can incorporate a time factor into the data analysis. An ensuing conclusion may be the following: Customers who have bought a Mystery novel reader within 3 months.Sequence rules, however, are not always that clear. Sequence analysis provides a means to identify such rules, no matter how obscure basket type analysis can be extended to a host of different settings. Think of a physician confronted with a patient with multiple health issues. These health issues usually precede a more serious condition. Thus, the basket defined by the initial health problems may often be the physician to proactively treat the patient. Focusing in on which of these events occur together may assist in discerning patterns and correlations

Literature Review
Data mining has taken an important part of marketing literature for the last several decades. Market basket analysis is one of the oldest areas in the field of data mining and is the best example for mining association rules. Various algorithms for Association Rule Mining (ARM) and Clustering have been developed by researchers to help users achieve their objectives. Rakesh Agrawal and Usama Fayyad are one of the pioneers in data mining. They account for a number of developed algorithms and procedures .According to Shapiro, rule generating procedures can be divided into procedures that find quantitative rules and procedures that find qualitative rules. As proposed by Gregory Piatetsky-Shapiro, William Frawley, 1991 tested the effectiveness of the algorithm by applying it to data obtained from a large retailing company. They used attributes for mining qualitative rules for categorical data using association rules. Association rules found application in many research areas such as: market basket analysis, recommendation systems to Advertising and Strategy formulation. In marketing literature market basket analysis has been classified into two models: explanatory and exploratory. The main idea behind exploratory models is the discovering of purchase patterns from POS (point-of-sale) data. Exploratory approaches do not include information on consumer demographics or marketing mix variables summarise a vast amount of data into a fewer meaningful rules or measures. Such methods are quite useful for discovering unknown relationships between the items in the data. Moreover, these methods are computationally simple and can be used for undirected data mining. However, exploratory approaches are not appropriate for forecasting and finding the cause-roots of complex problems. They are just used to uncover distinguished cross-category interdependencies based on some frequency patterns for items or product categories purchased together. A typical application of these exploratory approaches is identifying product category relationships by simple association measures. Pairwise associations are used to compare entities in pairs and judge which entity is preferred or has greater amount of some quantitative property. Julander, 1992 compared the percentage of shoppers buying a certain product and the percentage of all total sales generated by this product. By making such comparisons, one can easily find out the leading products and what is their share of sales. Examining which the leading products are for consumers is extremely important since a large number of shoppers come into contact with these specific product types every day. As the departments with leading products generate much in-store traffic, it is crucial to use this information for placing other specific products nearby. Another significant stream of research in the field of exploratory analysis is the process of generating association rules.Data mining plays an important role in the marketing field to analyze the various areas such as Consumer Buying behavior, sales forecasting, etc. To achieve their objectives researchers have developed many algorithms for developing Association Rule, Mining and Clustering. Market Basket Analysis helps the retailers to position their product in the appropriate place so as to maximize the consumer satisfaction and for improving the revenue of the store.
In the research work by Loraine Charlet Annie M.C. and Ashok Kumar Dit was observed the cost effective sales promotional activities can be designed by identifying the specific needs of customers. It was also suggested that the consumers are to be segmented and association rules are separately generated to satisfy their specific needs in a cost effective manner using some special sales promotions.1 In a study by Kavitha Venkatachari and Issac Davanbu Chandrasekaran it was observed that the product assortment in a grocery store are interrelated and these relations are exploited applying FP growth and Apriori algorithm.2Gajalakshmi.V and MuraliDhar M.S in their study found that every algorithm has its own advantages and limitations and has different approaches to association rule, discovery, pruning, ranking, prediction and evaluation.3 In a research work by Karthikeyan.T and Ravikumar.N it was found that the Efficiency of an Algorithm is measured based on its performance and scalability with other existing algorithm using a survey data.4The study revealed byK. Antony ArokiaDurai Raj and Panchapakesan Padma is based on mining the relationship from data on performance made in One day International(ODI) by Indian cricket team.5

Methodology
AI is helping the retail business from various perspectives. From guaging the business execution to recognizing the forthcoming purchasers, there are a ton of uses of AI in the retail business. Market container investigation is one of the vital uses of AI in retail. By examining the previous purchasing conduct of clients, one can discover which are the items that are purchased together by the clients. For instance, bread and butter are sold together, infant diapers and child rub oil are sold together, and so forth That implies one can break down the relationship among items. On the off chance that the retails the board can discover this affiliation, while putting the items in the shop, these related items can be assembled. Or on the other hand, when seeing that a client is purchasing an item, the sales rep can offer the related item to the client. This interaction of dissecting the affiliation is known as the Association Rule Learning and examining the items purchased together by the clients is known as the Market Basket Analysis. In this article, we will talk about the affiliation rule learning strategy with a functional execution of market container investigation in python. We will utilize the Apriori calculation as an affiliation rule strategy for market bin investigation.
What is Association Rule Learning?
The affiliation rule learning is a standard based AI approach that produces the connection between factors in a dataset. It has significant applications in the retail business including E-Commerce retail organizations. Utilizing this technique, the items sold in an affiliation can be investigated and can be offered to clients to purchase together. For instance, it tends to be found that assuming the clients have purchased onion and potato together, doubtlessly they have purchased tomato too. It very well may be given a standard as {onion, potato} -> tomato. These guidelines are called affiliation rules. The Association Learning techniques find these kinds of rules from the dataset containing the rundown of exchanges. The affiliation rule learning has three mainstream calculations -Apriori, Eclat, and FP-Growth. In this article, we will examine the Apriori technique for affiliation learning.

Apriori Algorithm in Market Basket Analysis
Apriori is a famous calculation utilized in market container examination. This calculation is utilized with social data sets for incessant itemset mining and affiliation rule learning. It utilizes a granular perspective where successive things are expanded each thing in turn and gatherings of up-and-comers are tried against the accessible dataset. This interaction proceeds until no further augmentations are found. It utilizes the idea of Support, Confidence and Lift where,

The Dataset
In this execution, we have utilized the Market Basket Optimization dataset that is openly accessible on Kaggle. This dataset contains the rundown of exchanges of a retail organization over the time of multi week. It contains an aggregate of 7501 exchange records where each record comprises of the rundown of things sold in one exchange. Utilizing this record of exchanges and things in every exchange, we will discover the affiliation rules between things.

Market Basket Analysis utilizing the Apriori technique
We need to import the necessary libraries. Python gives the apyori as an API which should be imported to run the apriori calculation.  Table and the structure is shown in Fig.1(a) and then updating score table as the data from consecutive windows come.

ARM-Update( Windowi, ConfidenceToScoreTable, ScoreTable )
{ For ( i = start-of-Windowi ; i < end-of-Windowi ; i ++) N = AssignScore (ith assoction rule, ConfidenceToScoreTable) ; CreateEntryScoreTable(N,ith association rule); } } where AssignScore (ith association rule, ConfidenceToScoreTable) : It is a function which is taking Input some Association rule and Confidence to ScoreTable and this algorithm is used with algorithm with Part-2 Algorithm and supplies Information processed to Part-2 algorithm which further processes the information. CreateEntryScoreTable (N,ith association rule) : It is a function which create new entry in the score table if some ith association rule is not in the ScoreTable or if present, then just add score N to existing rule. Part 2 -ARM-Predictor : This part is run after we have run ARM-Update Algorithm, this algorithm find the outliers on the basis of some threshold value. To complete a MBA you'll initially require an informational collection of exchanges. Every exchange addresses a gathering of things or items that have been purchased together and frequently alluded to as an "itemset". For instance, one itemset may be: {pencil, paper, staples, rubber} in which case these things have been purchased in a solitary exchange. In a MBA, the exchanges are broke down to distinguish rules of affiliation. For instance, one principle could be: {pencil, paper} => {rubber}. This implies that assuming a client has an exchange that contains a pencil and paper, they are probably going to be keen on additionally purchasing an elastic. Prior to following up on a standard, a retailer has to know whether there is adequate proof to propose that it will bring about a useful result. We subsequently measure the strength of a standard by figuring the accompanying three measurements (note different measurements are accessible, yet these are the three most generally utilized): Backing: the level of exchanges that contain the entirety of the things in an itemset (e.g., pencil, paper and elastic). The higher the help the more much of the time the itemset happens. Rules with a high help are liked since they are probably going to be material to an enormous number of future exchanges.
Certainty: the likelihood that an exchange that contains the things on the left hand side of the standard (in our model, pencil and paper) additionally contains the thing on the correct hand side (an elastic). The higher the certainty, the more prominent the probability that the thing on the correct hand side will be bought or, as such, the more noteworthy the return rate you can expect for a given principle.
Lift: the likelihood of the entirety of the things in a standard happening together (also called the help) isolated by the result of the probabilities of the things on the left and right hand side happening as though there was no relationship between them. For instance, if pencil, paper and elastic happened together in 2.5% of all exchanges, pencil and paper in 10% of exchanges and elastic in 8% of exchanges, at that point the lift would be: 0.025/(0.1*0.08) = 3.125. A lift of more than 1 proposes that the presence of pencil and paper expands the likelihood that an elastic will likewise happen in the exchange. In general, lift sums up the strength of relationship between the items on the left and right hand side of the standard; the bigger the lift the more noteworthy the connection between the two items.
To play out a Market Basket Analysis and distinguish expected principles, an information mining calculation called the 'Apriori calculation' is normally utilized, which works in two stages: Methodicallly recognize itemsets that happen much of the time in the informational index with a help more prominent than a pre-indicated limit. Compute the certainty of all potential principles given the continuous itemsets and keep just those with a certainty more noteworthy than a pre-indicated edge. The edges at which to set the help and certainty are client indicated and are probably going to shift between exchange informational collections. \ R has default esteems, however we prescribe that you explore different avenues regarding these to perceive what they mean for the quantity of rules returned (more on this beneath). At long last, albeit the Apriori calculation doesn't utilize lift to build up rules, you'll find in the accompanying that we use lift while investigating the standards that the calculation returns.
Performing Market Basket Analysis in R To exhibit how to complete a MBA we've decided to utilize R and, specifically, the arules bundle. For those that are intrigued we've incorporated the R code that we utilized toward the finish of this blog.
Here, we follow a similar model utilized in the arulesViz Vignette and utilize an informational collection of staple deals that contains 9,835 individual exchanges with 169 things. The primary thing we do is have a gander at the things in the exchanges and, specifically, plot the general recurrence of the 25 most continuous things in Figure 1. This is identical to the help of these things where each itemset contains just the single thing. This bar plot represents some goods that are habitually purchased at this store, and it is eminent that the help of even the most successive things is moderately low (for instance, the most continuous thing happens in just around 2.5% of exchanges). We utilize these bits of knowledge to educate the base limit when running the Apriori calculation; for instance, we realize that all together for the calculation to return a sensible number of rules we'll have to set the help edge at well underneath 0.025. these rules seem to make intuitive sense. For example, the first rule might represent the sort of items purchased for a BBQ, the second for a movie night and the third for baking.Rather than using the thresholds to reduce the rules down to a smaller set, it is usual for a larger set of rules to be returned so that there is a greater chance of generating relevant rules. Alternatively, we can use visualisation techniques to inspect the set of rules returned and identify those that are likely to be useful.Using the arulesViz package, we plot the rules by confidence, support and lift in Figure 2. This plot illustrates the relationship between the different metrics. It has been shown that the optimal rules are those that lie on what's known as the "support-confidence boundary". Essentially, these are the rules that lie on the right hand border of the plot where either support, confidence or both are maximised. The plot function in the arulesViz package has a useful interactive function that allows you to select individual rules (by clicking on the associated data point), which means the rules on the border can be easily identified.

A Four Part Solution
After discussing the requirements with the client, Smartbridge designed four self-service reports that provide the data and information needed to answer their questions.
1. Affinity Report -The purpose of this report is to identify the relationships between two products and how often a menu item is sold in conjunction with another. With this report, stakeholders are able to find relationships that are not obvious and make decisions according to the results.market basket analysis pandemic 2. Control Group Report-This report tracks operational KPI's like sales, transactions, and cost by comparing transactions that contain one or several menu items of interest versus the transactions that don't include those menu items. The purpose of this report is to identify how a combination of menu items contribute to sales, transactions, and costs.
3. Combination Report-This report displays the most common combinations of products to determine what products customers purchase together.

Transactions Detail
ReportThis report contains the details of each transaction such as products sold, quantity, price, sales amount, cashier, discounts, etc. This report is used to answer ad-hoc questions which require more detail.

Success Through Insightful Reporting
The client was able to identify changes and new patterns in products purchased together, track their sales, and identify some regions where they are performing better. The client also ran an analysis in the pre and post COVID period and found some products had unexpected sales growth.The client also detected the most common product combinations based on the sales channel and used all of this information for marketing and operations decisions.
ARM-Update Algorithm Input : Window, Look-Up This application was carried out in private store of UIN Malang Business Center, over contributing the gathered exchange information of which the information utilized were exchange information in BC UIN Malang on October first, 2014 with 1553 gathered information. In increases of the put away exchange receipts of 890753 up to 891319 exchange receipts. The further advance was contributing least help and least worth of certainty. In representation, client needed to embed exchange information with receipts from 890753 up to 890853. From that receipt there were 56 exchange information with 20 things could be recovered. Those 56 exchange information were acquired from the exchange receipts whose thing sums were minimumly 2 out of 1 single exchange The preliminary framework was completed in methods for framework preliminary of market bin examination application via affiliation rule tallying mode utilizing apriori calculation. In this investigation, a conversation of the tests that had been completed on the framework and assessment of the outcomes reacted by the framework. From this test, how designs contrasts of the created information would be known. The test was performed on 56 information by entering the underlying worth Minimum support= 3 • Minimum confidence= 1 the information that would be utilized for the test, which were the receipts between 890753 up to 890853 with the quantity of exchange information was 56 information arranged in regard of "Receipts" The estimation of the help worth of 1 thing can be gotten through the accompanying recipe: While the help an incentive for 2 things can be acquired with the accompanying equation: ( , ) = ℎ ℎ  Confidence esteem computation was produced of this after recipe: = ( | ) = ℎ ℎ ℎ ℎ ℎ �

Fig 4 -system design flowchart
Points for analyzing results The results below are shown in order as follows: 1. In the Score Table as shown in Fig 1(a), the attributes are set aside row wise at the top and named them a,b,c and so on for the simplicity of the transaction. a,b,c and so on are the items which are kept in market basket. As shown in the after the top row of total number of items, there are association rules with their assigned score. 2. Upper Association Rules, meaning rules which are above threshold are being printed. 3. Lower Association Rules, meaning the association rules which are below threshold.

Survey
In this questionnaire, there are different age group respondents, as shown in the chart, 58.8 are between the 20-30 age group, which are the maximum number of respondents wh participated in the survey and next to the maximum number of respondents are 30-40 of age group and 13.7% are between the 40-50 of age group and the least amount of respondents are50 and above of age group.
This question shows that how many customers used to buy before pandemic lockdown andhow many customers are haven't bought anything through online platforms. So as in thefigure, it shows that 72.5% of respondents have bought (FMCG) goods online beforelockdown and 27.5 respondents haven't even considered buying (FMCG) goods online. Now this question asks respondents that, before they buy online (FMCG) goods, what is thething which triggered them to use online platform rather than buying (FMCG) goods throughoffline retailers. So, in this 66..7% respondents says that they buy online(FMCG) goodsonline For Convenience 22.7% says that they buy online groceries for a better discount, 5.9%respondents say that they don't have any specific reason behind on buying goods online andonly 5.2% respondents say that there are some other reasons which convince them to buygoods (FMCG) online.
This chart shows that during the pandemic lockdown, the tendency of buying online (FMCG) goods has increased or not. So, the maximum number of respondents which is 51.6% says that they agree that during this lockdown they prefer to buy goods (FMCG) online, 35.3 respondents strongly agree on this , 10.5% says that they are neutral on this, which means they are not sure on this whether the frequency of buying goods (FMCG) goods online, 2% respondents disagree on this and only 0.7% respondents strongly disagree that it lockdown period doesn't increase the frequency of buying goods (FMCG) online.
In this Chart, it gives information about the respondents whether they are going to bu(FMCG) goods online in post lockdown. 63.4% respondents say that they are strongly agree on this statement, 28.8% respondents are agree on this, 10.3% respondents say that they arneutral on this statement like they are not sure that whether they are going to buy online (FMCG) goods online or not, 1.3% respondents disagree on this and there are no respondentswho can strongly disagree on this statement.

Findings
To Understand the buying Pattern of the Products that Comprises the Customers' BasketScreenshot 2 shows the Rules tab that gives an idea of emerging patterns, which specific items are related to each other more and association between them along with the importance.

Fig 5 Products associated with other products that comprises the basket
This is utilized to anticipate items that a client should buy dependent on different items that are now in the client's shopping crate. Subsequently utilizing Market Basket Analysis on worker 2008 R2 with the assistance of SQL Server Business Intelligence Development Studio, an arrangement is acquired for various classification of the items. According to the investigation, following example has arisen that can be utilized for different purposes like vital arrangement of the items on the rack, to improve deals, for accommodation of the clients, concocting advancements, to recommend items The best forecasts for singular clients, in view of past buys can be known with the assistance of numerous expectations inquiry. Various Predictions Query is made as demonstrated in screen capture 7 and expectations for singular clients is acquired as appeared in screen capture 8, where party ID is the contact quantities of the clients who make the buys and articulation gives the items that can be proposed to these clients dependent on past buys. This can likewise be useful for unwaveringness clients also, for making certain ideas to them.

Outlier Detection
After the fourth month manages as demonstrated in Table 3 we perform exception location, at the limit esteem = 20 at that point it partition the guidelines into two sections upper affiliation rule as demonstrated in Table 4 and lower affiliation runs as appeared in Table 1 Lower affiliation rules are known as anomalies.