HEURISTIC APPROACH IN RETAIL SECTOR BY USING MARKET BASKET ANALYSIS TECHNIQUE

Page 1


International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

HEURISTIC APPROACH IN RETAIL SECTOR BY USING MARKET BASKET ANALYSIS TECHNIQUE

Abhang Mali*1 , Amol Dhawale*2 , Sumit Rokade*3 , Shraddha Ashtekar*4 , Prof. R. H. Borhade*5

1-4Students, Computer Engineering

5Head of Department of Computer Engineering Smt. Kashibai Navale College of Engineering Pune, Maharashtra, India ***

Abstract - Acompanyororganizationanalyzestheirproductstoincreasetheproduct’sdeploymentsubstantially.They also dive deep into knowing customer behaviour. In the same way, Market Basket Analysis involves the analysis of products to extract their relationship with each other. This aids the retailers to know which items or itemsets would be more frequently purchased. The paper includes the implementation of Market Basket Analysis technique on various grocery datasets. It includes different methodologies/tools used, Market Basket Analysis technique system architecture, dataflowdiagrams,andtestcases.ItdistinctlyexplainstheworkingoftheApriorialgorithm.Thedeploymentmodelhere, represents working of the dynamic web application. It signifies how the Apriori algorithm helps to predict frequent itemsets. The performance metrics’ outcomes exhibit the assurance of the model to be used in grocery shops to predict frequentlypurchaseditems.

Key Words: Association Rule Mining (ARM), Data Mining, Frequently purchased items, FP Growth Tree algorithm, Market Basket Analysis, Shopkeepers

1. INTRODUCTION

Theretailersofsmallfieldslikegeneralstores,medicalstores,andgroceryfieldsstoretheirdataeitherinabook(record) orinanExcelsheet.Heretheyinvesttheirtimeandmemory toanalysetheirpresentitemstoextractsomeusefulinsight. Thisinsightisregardingtheincreaseofparticularproducts/items’sales.

Forexample–acustomergoestoagroceryshop.Ifhe/shebuysbread,thenitismorefavorablethathe/shewillalsobuy milkorbutterwithit.Theshopkeeperkeepstheseitems (milk,butter,jam,etc)closetothemilkitem.Thisworksonthe probability of these secondary items that are to be purchased along with the primary item. Thus, finding the probability anddisplayingfrequentlypurchasedsecondaryitemsiswhatMarketBasketAnalysisworkson.

2. OBJECTIVE

TocreateadynamicwebapplicationthatpredictsfrequentlypurchaseditemswiththehelpoftheMarketBasketAnalysis technique.

Fig1.PredictionofitemswithoutMarketBasketAnalysis

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

3. LITERATURE SURVEY

References

Description

I The Market Basket Analysis concept is explained at the foundationallevel.

2 Basic working of Apriori and FP Growth algorithm is discussed.

3. Apriori algorithm is explained and collaborative filtering concept is discussed in order to create a recommender system.

4. Describes market share between different brands of sanitarynapkinsinacertainsupermarketchain.

5. Two algorithms namely Apriori and FP Growth are exlusivelyexplained.

6. Terminologies and working of the Apriori algorithm are clearlydiscussed.

7. An exclusive correlation is developed between data, informationsupport,andconfidence.

8. MBA technique uses innovative technologies to help retailers maintain their customer retention and satisfaction.

9. New market basket analysis technique i.e., Logical Rule Mining(LRM)isexplainedhere.

10. Anewmethodknownartificialneuralnetworktechnique isimplementedinplaceofApriori

GapFound

Absenceofbriefexplanationoftheconcept.

Absenceofotheralgorithms

Drawbacks of Apriori algorithm are not discussed.

Lackofusageatlargescale

Applications of these algorithms are discussed.

The drawbacks of Apriori algorithm are not discussed.

Absenceofimplementationofthisconceptat largescale.

Since the Apriori algorithm has some drawbacks, it prevents the technique from beingfullyacceptable.

Since it is not in use at large, requires more awareness.

It has more complexity as compared to Apriorialgorithm.

11. One of the applications of Market Basket analysis i.e., ImageBasedProductRecommendationisdiscussedhere. Facesoverfittingissue.

12. Market Basket Analysis is done on water resources in ordertopredictfrequentlyoccurringissues.

13. MarketBasketAnalysistechniqueisusedisinhealthcare. the technique is used to find frequently occurring diseases.

14. Market Basket Analysis concept in sports field is thoroughlydiscussedhere.

15. Data mining and Market Basket Analysis are used to recognisepatternsandthenpredicttheoutcomeinorder toincreasesalesofpaperindustry.

Itisatime-consumingprocess.

Since,Apriorialgorithmisusedhere,itleads tosomedrawbacks.

Algorithm used is not good enough for large datasets.

Need of an efficient algorithm for implementationlikeFPGrowthTree

ThepaperincludesbasicintroductionofMarketBasketAnalysistechnique.Theyalsoincludebasicterminologiesofthe technique,needofthetechnique.Atlast,applicationsofMarketBasketAnalysisarediscussed.Theseinclude-

 MarketBasketAnalysisinImageBasedProductRecommendation

 MarketBasketAnalysisinwaterresources.

 MarketBasketAnalysisinhealthcare

 MarketBasketAnalysisinsportsfield.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

4. METHODOLOGY

MarketBasketAnalysisisamethodthathelpsretailers/organizationsincreaseproductsales/deployment.Itperformstwo importantfunctionswhichareasfollows-

1.Findsthefrequentitemsfromthegiventransactions

2.Findrelationshipsamongvariousfrequentlyoccurringitems.

The Market Basket Analysis is based on one important concept called Association Rule Mining (ARM). The ARM is an unsupervisedtechnique.Inotherwords,unlabelleddataisprovidedasinputtothemodelandthenthemodellearnsfrom this data to find the required useful insights. The association rule mining technique finds the hidden relationship among theproducts/items.

4.1 Terminologies of Association Rule Mining(ARM) –

1.Support

Itdeterminesthenumberofoccurrencesofaniteminoveralltransactions.

2.Confidence

3.Lift

ItdeterminestheprobabilityofpurchasingbreadalongwithMilk.

It determines the probability of purchasing the primary item along with its related item. Consider two items Milk and Bread.HereAistheprimaryitemwhichisrelatedtoitemB.

Fig2.AlgorithmsofAssociationRuleMining
AssociationRule Mining
Apriori Algorithm
Growth TreeAlgorithm

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

5. ALGORITHMS

5.1 Apriori Algorithm

TheApriorialgorithmisastraightforwardprocess.Thismeansitiseasytounderstandtheworkingofthisalgorithm.But theApriorialgorithmhassomedrawbacks–

1.Cannotortakesaconsiderableamountoftimetoprocesslargetransactions.

2.Facescomputationalcomplexityproblemsinhandlinglargedatasets.

3.Slowprocess

5.2 FP Growth Tree Algorithm

FP(FrequentPattern)GrowthalgorithmisusedinthisprojecttoimplementtheMarketBasketAnalysistechnique.TheFP GrowthTreealgorithmovercomesallthedrawbacksoftheApriorialgorithm.ThetimecomplexityofFPgrowthalgorithm isO(n).Thisdepictsthatithaslineartimecomplexity.IncontrasttoApriorialgorithm,FPgrowthalgorithmworksinthe followingsteps:-

Step1->Calculatethesupportcountsofallitemspresentinthegiventransactions.

Step2->Itcreatesatablethatstoresthesupportcountofthesefrequentitemsinascendingorder.

Step3->ASeparateattribute/columniscreatedfortheconditionalpatternbase.

Step4->Withthehelpofconditionalpatternbasedata,afrequentpatterntreeisgenerated.

Step5->Thusthistreewillrepresentthefrequentlypurchaseditems.

6. WORKING

Infig4,therearemultiplecustomersinoneshopkeeper.Aloginsystemisprovidedforeachandeveryshopkeeper sothat theycanaccomplishtheirdata.Alldataarestoredinsidethedatabasesothereisnoneedpen andpaper.Itdecreasesthe timebetweenitemsstoredintheshopandtheshopkeeper.

Fig3.FPGrowthTreeexample

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net

Database

Thedatabaseprovidesthefacilityofsaving,deleting,updating,andreadingtheitemsfromdifferentcustomers.Italsohelps toorganizetheitemsintheshopwhichhelpstoincreasethesalesofshopkeepers.

2.PeriodicCustomization

Periodic customization is defined as a period between some months (one to four) in which the web application is again monitoredandcustomized.

3.FormulationofData

Formulation means a collection of data that can be achieved by the information of the customer purchased from the shopkeeper. Datacontains theinformationofthecustomeralong withitems purchasedby him orherand alsoitcontains theinformationthatisfrequentlypurchased.

4.AssociationRules:

This concept helps to generate the frequent items purchased by the customer. Information Gain gives the purity of an attribute that helps to understand the item's pattern. Entropy helps to understand the randomness or impurities of an attribute.

Fig4.SystemArchitectureofMarketBasketAnalysisWebApp
1.

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

5.CustomerChurn:

Customerchurnmeansitisacollectionofitemsthatarenotpurchasedbycustomersoncertainperiodoftime.Ithelpsto removeunnecessaryitemsfromtheshopandrequireditemsarestoredintheshop.Customerchurncanhelptounderstand thecustomeranditspurchasingpattern.

6.AlertSystem

It helps the shopkeeper understand how much stock remaining in his/her shop and understand. The user requirement accordingtocustomertocustomer.Alertsystemprovidesthefacilitythatwhichitemsarestoredintheshopandwhichitem removesfromtheshop.

7.Output:

Output report contains the items/itemsets that are frequently purchased by the customer in addition. The itemsets are processedbyusingtheFPGrowthTreealgorithm.Understandingthecustomerbetterhelpscustomerbehavior.

7. DATA FLOW DIAGRAM

Firstlyshopkeeperneedstosignupbycreatingtheusernameandpassword.Thesecredentialsarestoredinthedatabase.If shopkeeperslogin with authorizedcredentialsthen theycanaccessto theservicesavailable tothem.Ithelpstoavoid the attackfromdifferentunauthorizeduserinoursystem.Aftersuccessfulloginintothesystem,appwillprovidetheservicesto theendusersothattheycanusethisservicesandaccomplishedtheresultofit.

Shopkeeper

Loginwiththerequired credentials

Monitorallactivities

Sevices

Periodic customization

Allappactivitiesaremonitoredby theadmin.Admin providesthesupportto theappsothattheycanhandlethe query of shopkeeper. Adminalsohelps in periodiccustomization oftheapp. In every date admin available for solving query of the shopkeeperandprovidesupporttoit.

Inthefig6,datagenerationtakesplacesbyshopkeeperandcustomerpurchasingitems.Credentialscontaintheshopkeeper's name, password,username,email address and mobile number. After successful creation of theaccount ofshopkeeper the appneedstofillthedataaboutproductpresentinthestore.Thisdataisstoredinsidethedatabaseusingdifferentmethods likeMySQLorPLSQL.Thenfromthedatabase,data issent foranalysis and operation block.These data is observed by the adminandmonitoredbytheshopkeeper.

Fig5.DFDLevel0

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

Observethestoreddata

Createaccount

Enter his/her credentials

Shopkeeper

DataStorage

Sendsdatafor analysisand operations block

AdditionalStorage

Dataanalysisand operations

Monitorsallactivities performedbythemodelin theanalysisphase

Sendsdatafor analysisand operations block

Thedata-relatedqueriesanddefectsaresenttotheadminsothattheycanabletofixedit.Additional storagecontainsthe informationofthephonenumberallcustomersIDsetc.Inanalysisphasedataisorganizedandmonitoringareimportantthis canbedonebyadmin.Finalreportofthedataissentbacktotheshopkeepersothattheycananalysethereporttheperform thecertainactiononit.Actionperformanceisdependuponworkingcapacityofthedata.

8. UML DIAGRAMS

Fig7,thesystemhastwoactorsoneisshopkeeperandanotheris admin. These two actorsare responsiblefor datagenerationandperformingorusingtheapplication.Tousetheapplicationfirstlyforshopkeeperandadmin need to logininto thesystembyusingcredentials thatis username password email address there are multiple shopkeeperbutonlyoneadminthesystem.

Aftersuccessfullyloginintothesystemshopkeepercanperformdifferentoperationslikeadd,delete,updatethe customerinformationlikesitemspurchasedbythecustomer.Togeneratedatashopkeeperisresponsible.

Fig6.DFDLevel1

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

Register

Login

Shopkeeper

View recommendati

Add–Delete items

Manage users Monitor useraction and feedback

Admin

Provide feedback

Manage Alert

View transaction data

Input transaction data

ShopkeepercanviewtherecommendationprovidedbytheAppsandalongwithperformthe certainoperationonthedata. IthavethefacilitytoprovidethefeedbackabouttheworkingofappsaccordingtofeedbackprovidedbytheshopkeeperThe useractionperformbyshopkeeperthatmanageandcontrolbyadmin.

8.1 Class Diagram

Class Diagram gives the relationship between the different actors in the system. In addition it provide the facility of the understanding the attributes and method of the specific actors or class. It provides the facility of the abstraction and encapsulationso that the data is secureand robust. It cannotaccessed by unauthorized person. Fig7.hasdifferentclasses likecustomer,order,shopkeeper,adminanditemetc.

Customer

+id:Int

+name:String

+readItem(int):String

+returnItem():Boolean

+feedback():void

+purchaseItem():String

Order

+id:Int

+Items:List<Items>

+getId():int

+setId(intid):void

+getItem():List<items>

Shopkeeper

+id:Int

+name:String

+address:String

+contactNo:Long

+addItem():void

+deleteItem(params):void

+updateItem(params):void

Fig7.UseCaseDiagram

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

Item

+id:Int

+price:int

+description:String

+readItemDescription(int):String

+getPrice(id):int

+id:Int

+name:String

Admin

+contactNo:Long

+showShop(id):Shopkeeper

+generateAlert():String

+generateReport():List<String>

+seeReview():String

Customerisresponsibleforthegenerationofthedata.Customerhashis/herid and name as an attribute.He/She can able to read the item in the store. If any item is not the favouriteofanycustomerheorshecanreturntheitembacktothe shopkeeper.Theanotherclassisorderitcontainbasicallytwoattributeidanditems.

Theitemsofthetypelistcontainlistofitemsthatarepurchasedbythecustomer.He/She can able to read the item in the store. If any item is not the favouriteofanycustomerheorshecanreturntheitembacktotheshopkeeper.Theanother classisorderitcontainbasicallytwoattributeidanditems.Theitemsofthetypelistcontainlistofitemsthatarepurchased by the customer. Order class have the different method like setId and getId which is responsible for setting the id of the orderandgettheorderid.

There is a main class called as shopkeeper that have the attribute id, name, string, address and contact number. This attribute have its own setter and getter method. It have methodlike for adding thethe item have addItem method which takes the order id asa parameter. Another important character is the admin. It is responsible for generatingthefeedback andgeneratingthereportofthesystem.Italsohasid,nameandcontactnumberasaattribute.

8.2 Sequence Diagram

Thesequencediagramgivestheflowofthesystemhowexactlyworksandwhichphaseisgoingtobeimplementedinorder to get the desired outcome. It shows the sequence of implementation of the data. In sequence diagram contains the informationofdifferentphaseslikeactors,flowofdata,applicationserver,etc.

Infig8,therearedifferentactorslikeshopkeeperanddifferentcustomer.Customerisresponsibleforgenerationofthedata. Intheshopmultiplecustomerspurchasethedifferenttypesofitems.

Shopkeeper requests for new login credentials. Shopkeeper performs the certain operation on the data like add the transaction data that contain the itemsets that are purchased by different customer. In addition of the analysis of data is donebytheadminthatoperateandgivesthefinalreporttotheapplicationthatisshopkeeper.

Fig7.ClassDiagramofMarketBasketAnalysisWebapp

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

Application Server

Shopkeeper

Requestfor login

FinalReport

Giveaccess

Add Transactions

Sendreport

Analysisofall items

Analysis

DEPLOYMENT MODEL

Allthedataofuserandtherespectiveproducts/itemsisstoredinclouddatabase.ForthisFirebaseplatformisused.Code of storing the data includes Firebase libraries. These are properly imported along with the initialize key of the web application.Ifanychangesarerequiredinthestoringofthedatalikeattributesnamesornumber,thenproperupdationis donehere.

Fig8.SequenceUMLDiagram 9.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

CreateProjectandaddUser

Build Changes are build

ChangesFixes Monitoring Applicationand infrastructure Deployment Codeisdeployed Commit

Update

Thewebapplicationisfirstdeployedinthestagingenvironmentwhererequiredcustomizationorupdation isperformed. Theresultsarethentakenintoconsiderationandthenthewebapplicationisdeployed.

10. RESULTS

Fig10representsafrontviewofthewebapplication. Thisincludesthesignupandloginoptionsfortheshopkeeper.The sidebar on the top left contains selection-boxes that include boxes as Storage, Account, Prediction, About, Sample respectively.

Fig9.DeploymentModelofWebApp

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Fig11representsthestoragepage.Userwhenclicksonthe“Storage”selection-box,thenhe/shewillstoretheirdatahere. The data can be in .csv, .exe, etc formats respectively. The data then will be stored in clouddata store of the Firebase platform.

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072 © 2024, IRJET | Impact Factor value: 8.226 | ISO 9001:2008

Fig10.AccountPage

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

Fig12representsthepredictionpage.Aftersuccessfullystoringthedata,userwillgoontothepredictionpagebyclicking onthe“Prediction”selection-box.

Fig13representsadummydatasetbeingstoredintheFirebaseandthendisplayedonthepredictionpage.

Fig11.Storagepage
Fig12.Predictionpage

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

Fig14representsthegraph.Thegraphshowsfrequentlypurchaseditems.Itemnamesaredisplayedbeloweachbarofthe graph.Thesizeofthegraphcanbeincreasedtorepresentmorenumberoffrequentlypurchaseditems.Withthehelpof thisgraph,user(shopkeeper)willeasily.

14.Graphshowingfrequentlypurchaseditems

11. CONCLUSION

TheresearchinvolvesdeepanalysisofMarketBasketAnalysisandthedevelopedwebapplication.Cametoknowdifferent reviewsofresearchersontheMarketBasketAnalysistechnique.MarketBasketAnalysis(MBA)isapowerfuldataanalysis method with several significant benefits and drawbacks. Successfully created a dynamic web application called “Market Basket Analysis WebApp” that accepts customers’ data and efficiently predicts frequently purchased items. By analyzing deepintotheconcept,manynewaspectsofthetechniquewerediscovered.AlsocametoknowtheproblemsoftheApriori algorithm that were solved by FP Growth Tree algorithm. When applied correctly and in combination with other data

© 2024, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1589

Fig13.Predictionoutput
Fig

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 11 Issue: 05 | May 2024 www.irjet.net p-ISSN: 2395-0072

analysis techniques, market basket analysis is a useful technique. Thus, the Market Basket Analysis technique helps to increasethedeploymentrateofproductsatasubstantialrate.

12. REFERENCES

[1] Abhang Mali, Amol Dhawale, Sumit Rokade, Shraddha Ashtekar, Prof. R. H. Borhade, “HEURISTIC APPROACH IN RETAIL SECTOR BY USING MARKET BASKET ANALYSIS TECHNIQUE”, International Research Journal of ModernizationinEngineeringTechnologyandScience,Vol5,No.11,1615-1619.2023.

[2] Vippala Nagendra Reddy, Panta Sai Sathvik Reddy, “Market Basket Analysis Using Machine Learning Algorithms”,2021.

[3] YükselAkayÜnvan,“Marketbasketanalysiswithassociationrules”,2020.

[4] ShishKumarDubey,SonuMittal,SeemaChattani,VinodKumarShukla,“ComparativeAnalysisofMarket Basket AnalysisthroughDataMiningTechniques”,2021.

[5] Jiangping Chen, Xiaoxian Yang, Lihua Chen, Li Dong, Yuanyan Fu, “An Analysis of Shopping Basket in a Supermarket”,2010.

[6] MalihaHossain,AHMSarowarSattar,Mahit KumarPaul,“MarketBasketAnalysisUsingAprioriandFPGrowth Algorithm”,2019.

[7] WarniaNengsih,“AComparativeStudyonMarketBasketAnalysisandAprioriAssociationTechnique”,2015.

[8] Djoni Haryadi Setiabudi, Gregorius Satia Budhi, Mining Market Basket Analysis’ Using Hybrid-Dimension AssociationRules,CaseStudyin MinimarketX”,2011.

[9] AhmadM.A.Zamila,AhmadAlAdwanb,T.G.Vasista,“EnhancingCustomerLoyaltywithMarketBasket Analysis UsingInnovativeMethods:“APythonImplementationApproach”,2020.

[10] DamlaOguz,FatihSoygazi,“Aninterestingnessmeasureforknowledgebases”,2023.

[11] Anshul Bhargav, Robin Prakash Mathur, Munish Bhargav, “Market Basket Analysis using Artificial Neural Network”,2014.

[12] Premanand Ghadekar, Anay Dombe, “Image-Based Product Recommendations Using Market Basket Analysis”, 2019.

[13] Tiyasha Tiyasha,SurajKumarBhagat,Firaol Fituma,Tran Minh Tung,Shamsuddin Shahid,And ZaherMundher Yaseen, “Dual Water Choices: The Assessment of the Influential Factors on Water Sources Choices Using UnsupervisedMachineLearningMarketBasketAnalysis”,2021.

[14] Abishek B. Rao, Jammula Surya Kiran, Poornalatha G, “Application of market–basket analysis on healthcare”, 2021.

[15] WanFaezahAbbas,NorDianaAhmad,NurlinaBintiZaini,“DiscoveringPurchasingPatternofSportsItemsUsing MarketBasketAnalysis”,201

[16] M.J.ZakiandW.J.Meira,DataMiningandMachineLearningFundamentalConceptsandAlgorithms,vol.53,no.9. 2020.

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.