Practical Applications of Data science in Ecommerce
Key Takeaways
Explores practical applications of data science in ecommerce, including personalization and demand discovery
Full Transcript
So hello and welcome everyone to another session in the data r series. We are thrilled to be here with you this evening for a session full of action-packed learning. I am Sedat part of the data science team at analytics vidya. So for those who have joined us for the very first time a brief introduction to the data sessions. So guys the data is a series of webinars conducted by analytics vidya and led by top industry experts. It is a fun way to understand the concepts of data science from the leading players in the data tech domain and as the name suggests it's one hour dedicated to data. We are hopeful that these sessions are going to be a great source of enrichment and value adding for our community members. So now onto our session for today which is practical applications of data science in e-commerce. So in this data Anurag is going to demonstrate the use cases that leverage data science frameworks for driving higher revenue through improved personalization and demand discovery. So guys before we kick things off and I hand it over to our speaker a quick recap of the housekeeping items. We are uh so yeah we are recording the session and we'll make the recording available in a few days on our YouTube channel and please use the Q&A section for asking any questions you might have during the session and we will do our best to answer them as the data progresses or towards the end and also we will share a poll about the feedback of the session towards the end of the session which I request you all to kindly fill up. So now guys onto our speaker in this session of data we have Anurag Na with us. So guys Anurag has more than seven years of experience in data and analytics domain. He is currently working as analytics manager at Myntra. He is responsible for facilitating datadriven executive decisions across various verticles and previously he has worked with Genpack and New Sigma as a data scientist. So guys, so now over to you Anurat, the virtual stage is all yours. You can share share your screen now. Thanks. Thanks for introduction. Yeah. Uh hello everyone. Thank you for joining me. I'll quickly share my screen. Is my screen visible? Yeah. Yeah, it's visible. Okay. So yeah, I think I'll quickly start. So u uh yeah as tak mentioned I think um I I have about 7 years of experience in this domain and uh currently I'm leading the revenue analytics team at Myntra. So today what we'll be talking about is a couple of use cases I have brought and maybe we can discuss more but two very uh simple but underused use cases of of data science applications which e-commerce companies often use. So there are various different e-commerce companies in India like Myntra, Flipkart, Amazon, right? So a lot of you would be familiar, many of you may have even purchased from them. So some of you might be able to relate to to how uh it all works behind the scenes. So I'll I'll quickly start. So the first use case that I wanted to discuss was personalization through brand preference, right? And so what do I mean by that? So uh a lot of us don't fail to realize especially uh while working with data is uh customers make decisions psychologically and not based on a particular pattern. So uh one example I could give you is uh 20 years back uh most of the groceries that were bought across let's say tier 2 tier three cities were through essentially kirana shops or local grocery shops and that's because a lot of the families had personal connections with these grocery shop owners right they they used to keep lend they used to lend money they used to keep record of all of the transactions you make with them and so there was a personal connection there how it has evolved right now is you have everything or most most uh uh consumer items in metro tier one tier 2 cities being purchased online right and in this scenario how do you build that kind of a personal relationship with the customer so uh one way is through brands so a lot of brands that exist across various categories take take phones uh footwear uh clothing apparel which which myntra specializes in or beauty beauty which again this available on Myntra and Nika. So a lot of these categories now have various brands who have built a certain image through the quality of product they sell through their price range various different factors on these e-commerce platforms. Right? So think of the e-commerce platform as a marketplace, right? Where a lot of different brands are essentially either competing against or are unrelated to other category brands, right? So one way to uh build a relationship with a customer is to often recommend them and seems simple but it's to often recommend them the brands that they're most likely to purchase. Now this may this may be brands that they've already purchased in the past. So one example would be if you've bought let's say footwear from campus or if you bought footwear from Nike right you may not have bought from Puma but intuitively we know that they Puma also applies to them the same target market it's the same category sports footwear right so a lot of these uh signals tell us that customers have relationship with brands but then there are certain other brands that they also qualify for but don't get enough visibility or are not inside their uh current price range. Right? So how uh one one of the ways we go about personalizing is so if you look at the first box here the first question is which brands we often purchase right it's a very simple thing so if we look at customer data I I've created these so that we can visualize it but you can also think of it in terms of data so if you have for each customer one row with a set of all the brands that they've mostly purchased they often purchased they've recently purchased right So for each customer you would get a set of brands. For example, customer A here likes to buy Nibia and Lakme from let's say an e-commerce store called X, right? And customer B buys Simalia VCC. Seems like personal care, right? Personal uh hygiene products or personal care products, right? This this also uh is borderline I would say beauty and cosmetics and uh customer see let's say buys Nike and Puma. So they're into footwear, right? So customers have uh an affinity to certain brands in various categories. So often when you go to supermarkets when you look at shampoos and are deciding which one to buy the only things available there are the packaging the placement and whether you are familiar with the brand or not. So uh say popular shampoo brands like Pantene or Sunsilk have sold a lot throughout the years because these CPG brands essentially have gained good enough shelf space. They're they often stock up and they keep coming up with new packaging to entice customers to to continue their relationship with them. Right? And so what we do is first we try to understand which c which brands our customers assigned to. Right? So if customer A often purchases Nivea, Lakme, say L'Oreal, say Huda Beauty, right? There there's various different brands and so we get a list of all of these customers and the brands that they are assigned to, right? Uh similarly the other question comes which brands are often purchased in the same basket, right? And so what we're trying to find out here is let's say you are at a again at a supermarket and I give this analogy because it's very similar to e-commerce. It just happens online. So let's say you're at a supermarket and you have a cart with you and you are trying to uh decide on which products you want to buy in in this particular visit. Okay, right and so there if you think about it through customer transaction data right for each transaction uh we as a e-commerce company already know which brands they have purchased within that particular transaction and that's what's often referred to as a basket right. So for example, if you went to purchase uh if you went to a supermarket and uh let's say you bought oil from parachute, you bought uh let's say um you bought let's say milk from Nandini, right? And you bought let's say uh shampoo from Himalaya, right? So these brands now have occurred together in the same basket because you bought all of them in your same visit, right? Something similar can be done across all different customers who visit an e-commerce platform. Right? So for each customer you would have all the transactions that they made and then for each transaction you would have which are the brands that they've purchased. Right? And I have uh another slide on uh going slightly deeper on on how we get this to happen. But let's say if there were a method that could help us bucket these these brands together, right? For example, customers who buy Puma are also likely to buy something from Puma. Now, Puma, for example, sells footwear, sells sportsware, right? All kinds of different uh categories exist. And so, let's say if a customer who buys something from Puma often buys something from Fela also and uh also we've observed that they buy a lot from L'Oreal, right? And this this could be gender uh separate also but I've taken a common use case here. Similarly, if you see here there's a basket where Adidas occurred under armor and Nibia, right? And so what we try to do is create baskets of brands, right? So baskets of brands that occur together, right? And so if we know a set of brands often occur together, if I direct a customer towards two of those brands which they like, then the three other brands in that basket are also likely to be discovered by the customer which they end up liking more. Right? It also helps increase brand penetration uh for the e-commerce company. So you want your customers to try various different brands of products and then choose what they like versus go with one brand because uh they are at a high risk of churn if they only purchase one sort of thing from your platform. Right? So for example, if I always buy uh cosmetics from Nika, right? Um if the same cosmetics are sold at three other e-commerce stores, right? and the price is the only thing that creates the difference among them. Then it eventually company gets out competed by smaller players who give larger discounts, right? And so what we try to do is we try to create baskets of brands uh that we will map customers to, right? And so the third step is that so these customers ABC based on their set of brands and I've only included few examples for each but you could have three four 10 brands that the customer often buys right if you've bought 25 brands till now you could easily have a top five top six brands that you often buy and so those customers are now mapped to one of these baskets right and so for example customer A is mapped to say a basket S now this basket S could be this basket Right? And so these brands along with various others. So let's say there could be 8 to 10 brands in a basket. Right? Now how do I do the mapping? So that could be done in various different ways. Obviously we follow a particular way of doing it whenever we do this at Entra. But uh even for other companies I think uh it depends solely on the use case. So for example, if a basket has 10 brands and you are assigned to four of those brands, that could be a high affinity score, right? Whereas someone else is only assigned to one brand there. And so we there are various similarity measures, but essentially what we do is we map customers to these baskets, right? And that is because if you are someone who buys a lot of Adidas, right? We believe through the data and I'll show you how we get the association rules but uh through the data you have observed that these guys are also likely to buy something from under arour they might also buy something from Nibia right and so we are trying to increase brand penetration through uh through these exercises right now this uh section in between so the first section is pretty pretty much clear but in the second section how do we create these baskets of brands right so which combinations exist, which one should we go for? So, uh the simplest way uh in going about doing that is association rule mining, right? And the most popular algorithm is a priority algorithm. Now, there are various other uh methodologies that I haven't included here. For example, you could do collaborative filtering to understand which customer should be recommended which particular brand, right? And so Netflix the the uh uh the famous Netflix case of when they first came up with the recommendation engine uh that one ended up using collaborative filtering right the reason why I've included a priority algorithm here is because this is the most uh practical uh use case that you can take advantage of at a store. So if I want to recommend a different brand to each and every different customer at all the time, it's it's very hard because the store is fixed. You have a a a finite amount of real estate where the customer views various different products and chooses one from them if they if they have an intent to buy. And so it's very hard to pop up brands in uh in the customer's feed uh which often also disrupts their their flow of of browsing right so so the reason why we do this is you can always recommend uh brands in cohorts right so you may have seen banners on let's say Amazon saying buy um let's say uh sportsear right from xyz brands right and so those combin variations of brands. What they're essentially doing is uh filtering or putting a default filter in the back end uh of of a category selection. So all the stuff that belongs to brand XY Z gets filtered for you and so you only observe those brands, right? Instead of just one brand, right? And so uh this is just a very simple use case of how you would go about doing it. But uh you can definitely Google there are a bunch of tutorials on this and uh you may find them on YouTube and also but how what it would look like is essentially this would this is what input data would look like right it's transaction data so each row is one customer here and what you have here is the item that they bought from that store during that visit so this is just an example you could have any number of items here right uh a supermarket if you've already observed has a bunch of different items So uh you will have about 100 to 150 columns here just because there are a large number of distinct items that are sold on pretty much any e-commerce platform. So uh this is sort of the in what the input data looks like. Now uh what the a priory algorithm gives you and you can read about this but what it essentially gives you is uh what is the impact that one object has on the sale of the other along with it. Right? So one example would be let's say uh you've gone to the supermarket and you've bought uh bread right and you've also bought butter now you keep going to the market every week let's say right for shopping and uh what we observe is every time you buy bread you also buy butter right so should I so the question arises should I recommend butter to someone who's uh who's already buying bread not not it's not clear right why Because butter could be purchased individually also. Maybe you just have butter with everything, right? And so the bread has pretty much nothing to do with it. So association rule mining essentially filters out rules that you can use to identify which products drive higher sales of other products. Right? And the reason why we do that is we we can obviously bundle them together, create packages that we can sell at a discount or we could provide recommendations on you may also like as as already mentioned you may have seen on Amazon people also purchased and then you get a bunch of recommendations right so that's those are some potential applications for this so how the uh how the output here in is interpreted is based on a particular uh item let's say cur What is the impact of the sale of yogurt and whole milk on kurd? So the moment I added kurd to my basket, how likely am I to also add yogurt and whole milk to my basket? Right? If I'm very likely and if it's the best recommendation for kurd, then that's what should show up in your you may also purchase or you may also want to purchase. Right? So we are essentially trying to find what input should go into the recommendation. Right? So this is not necessarily the best way to recommend for an e-commerce platform, but it often helps with running campaigns, right? You may want to run certain campaigns and recommend customers based on their last purchase, right? Or something they purchased last few two or three times or very recently. So that uh this has a bunch of use cases there. So if you if you see the input here, uh what is the impact of kurd on yogurt and whole milk? There are various metrics you get here. So in this image you see support and lift. There's also something called confidence. So what are these? These are basically ways of measuring how strong a particular rule is. Right? So if someone tells me, hey, if someone's bought a t-shirt, I should recommend them jeans, right? But that is uh completely intuitive and at the moment hypothetical. You would have to look at the data to identify how that works out. And so that's what the priaryy algorithm is used for. The interpretation here would be if if I purchase a brand X, how likely am I to purchase the brand Y, right? Based on the use case that we saw. So uh the support here would tell you okay, how often do both of these occur in among all transactions. So N here is the total number of transactions that you have in your in your complete data set, right? And then X is a particular brand and Y is a particular brand. And you want to understand how often do they occur or what percentage of times do they occur among all my transactions. Right? So why we look at support is we want to understand okay if certain brands don't occur together very often they have a very low support essentially then there is no we are not very interested in combining them together. Right? So that's that's why we we use support as a measure and we put cut off. So for example you could have 0.015 015 as the cutff here, right? And so uh that cutoff would help you identify okay which items or pairs of items have now qualified for a set right so that's that's support uh we also look at confidence so what confidence is if you see here and FRQ stands for frequency if it's it's not clear but yeah basically frequency of brand X and Y occurring together divided by just the frequency of brand X occurring. So for example, if I'm looking at the impact of the sales of let's say Nike on Puma, right? So how often does Nike and Puma occur in my transactions divided by how often does Nike occur individually, right? And so the reason why we do this is because we want to try and eliminate the effect of uh the individual effect of Puma, right? You may just like Puma as a brand and that is why you're buying it. It so happens that you also bought Nike within the same purchase but they may not have any relationship with with each other right and so confidence is a metric that helps us determine that. So finally the the key metric that we use to eventually identify what should be recommended for each brand is is lift right and so lift is basically a uh support by uh confidence essentially. So uh this this is basically like a use case where u you can recommend certain brands to certain customers. So if you think about uh the homepage of Flipkart right you have a top banner there right on your homepage and so if you see buy sports uh let's say buy active wear right uh from Nike Puma FA and so on right yeah uh yeah yeah Tang money I think you uh had a question yeah yeah we can take the questions at the end if you want at the end. Great. Great. Yeah, I I'll leave you at the end for works. So, yeah, I think yeah, coming back the idea here is basically bundling brands together and then running campaigns for those brands. So, if I if I go back to my previous use case, let's say uh Adidas, Under Armour and Nivea are brands that often occur together. What you would see companies do is they would have a they would have a banner that let's say a creative team creates. They would have certain copy. So for example, uh take a look at these uh styles that we've specially curated for you, right? They would have something like that and then they would have the logos of these brands because people often relate to these logos, right? And so you could obviously add discounts. Let's say 10% off on purchase of thousand, right? Something like that. And so that incentivizes customers to explore other brands similar to what they've already purchased or trusted, right? And so it helps improve brand penetration. It gives you recommendations based on brands that you are most likely to purchase, right? And it also helps increase the size of the basket. So if you if you purchase one of these items, let's say you bought shoes from Adidas, right? And then you saw I have a tracksuit from Under Armour. That's good. You want them to make the purchase within the same transaction. You don't want them to come back because the likelihood of transaction goes down, right? So that's that's the general idea. Okay. Uh so I think that's that's basically the main use case here. It's brand personalization and essentially penetration among certain cohorts of customers. Yeah. So demand discovery. Okay. So this is the second use case I wanted to discuss. So one of the things that you would have observed with various e-commerce firms over the years is every firm starts with uh one particular category right for example there are if you look at um whatra did right um started primarily with apparel for many years and then they slowly started adding various different categories first they started adding let's say footwear then they started adding let's say sportsware And then uh they went outside their core categories and let's say added beauty and personal care which is also a very large category there. So there are there's also paid there. So there's every e-commerce company Amazon, Flipkart, Mantra, Nika, all of these companies eventually end up expanding into various different categories. Right? The problem that companies often face is let's say you are you are a site that is uh primarily focused on selling kids apparent right you sell kids clothing now you've started cosmetics they often don't go together right so what do you sell along with it so let's say if you are a footwear store and then beauty and personal care has more alignment with it and you decide okay I will start a beauty business also I'll add a selection of uh selection of products and then we see how it goes, right? What ends up happening is 95% of your revenue would still come from footwear because that's what customers associate with, right? But they do spend on beauty and personal care products, let's say, but on other platforms, not necessarily yours, right? And so, how do you get them to come to your platform, trust your platform for these products, and then start purchasing them from here? So let's say if you're someone who buys cosmetics or lipsticks a lot. Let's say we take an example and you've never bought lipsticks from Flipkart, right? You've only bought let's say footwear and apparel from Flipkart. So Flipkart would want you to explore their beauty collection and then end up making those purchases here rather than at some competitor's site, right? And so demand discovery is essentially around finding demand in customers that is being satisfied elsewhere, right? at other e-commerce sites or through offline forms. So how we go about doing that is so one example I could give you is let's say you are starting a new category let's say I want to start selling um let's say I want to start selling consumer electronics right so if uh some of you may have observed if you if you are a regular user of Swiggy maybe you might have observed that Swiggy has started something called minis right where they sell headphones and airpods various other consumer electronics right but Swiggy is primarily a food platform form right you would not expect to buy you would not expect someone to buy uh consumer electronics so they slowly started with Instammart which delivered groceries delivered various other CPG products and then eventually they've now expanded into electronics so when they start selling electronics people are not going to look at let's say which headphones you want to sell because you're not a platform that primarily sells headphones right so how do you find customers who are likely to buy headphones phones from your from your website. So or your app. So uh one way is purchase propensity, right? So purchase propensity and this again occurs in various different forms in in data science but uh purchase prop propensity uh essentially means finding customers and their likelihood to purchase some things from your platform. So if I am Flipkart and I start selling laptops right after I start selling phones, right? So I've been selling phones for a year now I'm starting laptops and it's been 3 or 4 months and uh the laptop sales haven't gone up, right? Why? Because people are purchasing them as well. So how do I find customers who are likely to who trust the platform enough who made enough purchases could be various factors but who are basically ready to trust and are most likely to purchase from your platform. if you incentivize them, right? And so, uh, one of the ways is a purchase propensity model. So, how this model essentially works is, uh, we basically look at all the different factors that have an impact on a customer making a purchase, right? So, what are the things that uh have uh an impact on purchase, right? If you look at the customer's history, right? you uh you can always say that okay if a customer purchases every month from a particular store they're likely to come back next month also right if a customer spends at least 1,000 rupees in each of their transactions they are likely to spend at least a,000 in their next now these rule sets cannot obviously be manually made and they are very dynamic which is why we use a model here but how we go about doing this is we look at let's say the transaction history of the customer right what is their median transaction value, right? How much do you spend per transaction essentially? And uh what is the total amount let's say that you spent in the last 3 months, in the last one year, in the last 5 years depending on where the e-commerce site is. What are the uh or or number of items purchase per transaction? Do you buy at least three items when you make a purchase? So, this again varies from platform to platform. So if you're if you're buying food on Zumato, you are likely to buy at least two items to three items per purchase, let's say, right? And so uh uh that varies based on the price of the product and the category. But within a particular business, it is very it has a fixed distribution, right? And so we can utilize that in identifying uh if someone purchases three products on their per transaction, they are very likely to purchase something new, right? That's the kind of insight we're looking for. So that's one. Uh the next one would be top brands purchased. Again, like I mentioned earlier, uh customers have a high affinity towards purchasing from brands that they trust and like. So so what are the brands that you purchase? So if you've purch there could be certain brands where let's say if you've bought u let's say if you bought t-shirts from roadster uh in the last uh 6 months you are likely to buy another t-shirt at least in the next 6 months even if it's not right. So these are the kind of patterns we're looking for. Uh and then discounts avail. So there are various other uh there are various other variables that can be taken here. uh payment gateways um phone which phone you are using uh when do you browse or which day of the week do you browse so there are various variables like that discounts obviously offers and discounts are uh uh very prevalent in e-commerce websites and so you will find discounts pretty much everywhere right and so they obviously have an impact on the price and so what e-commerce sites try to do is they try to sell you more uh or try to increase your basket so that they can make up for the lost margin on the discount that they give right and so uh the discounts obviously if you are a high discount customer I cannot sell you something at MRP you are not interested right similarly if you don't like things that are on very high discount I cannot sell you something at 70% off you you will not be interested right and so different discounts availed by different customers throughout their purchase history also have an impact on whether they're likely to purchase some some new category or right and so uh similarly there's there's other data like demographic data you have gender city tier I've only included some of the common ones but yeah these uh there are other demographic data also that could be available and then browsing indicators there's so here there there are a bunch of variables that could be used um what do you often browse what did you last browse uh how many list pages uh how many product pages do you end up on How often did you browse and then end up on your product page? So the conversion there also has an impact. Favorites which is similar to a wish list that you would see on on Amazon or Flipkart. Uh you are wish listing things that you like or you are expressing intent of purchase uh in the future, right? And so these uh these are some variables. There are various other variables also. For example, how much do you scroll? Right? If you scroll too much beyond a certain point then maybe you are less likely to purchase versus uh the other extreme where if you don't scroll enough could be different reasons right let's say you don't find the selection that you like there right and so you don't scroll enough or you really like the selection but you are having a hard time deciding what to buy so different kinds of customers here uh exhibit different behaviors right and uh so yeah I think browsing I think there's a lot of data in browsing indicators that that can be used uh because that's primarily what you essentially did at the store right that's that's what that data is so we basically these are some of the data sets we use there's various others also but yeah I think one very standard way of going about solving this problem is let's say I have customer uh I have all of these metrics available for a particular customer I also have uh a variable stating whether they ended up uh making a purchase in your new category. So let's say you're as as we discussed earlier, let's say we are Swiggy starting consumer and uh consumer electronics, right? And so how likely are you to buy consumer electronics, right? The way we go about doing that is we look at customers who've made a purchase in electronics versus those who haven't, right? So we have two samples of customers, ones who have bought and ones who haven't. And then we take all of this data for all of those customers. And then we have a one zero column indicating okay these are the customers who did make a purchase in electronics and these are the ones who didn't. So based on the the difference in their patterns, we are trying to find which are the customers who are likely to purchase, right? And so what are the characteristics? What are the behavior exhibited by a customer who makes a a consumer electronic purchase on your platform, right? So all of this data basically goes into a classification model. Now a lot of you might be already familiar with with classification models but uh yeah I think uh you you would the the process here would be very standard. You would first go about doing an EDA. So how would you do an EDA? So one example is if you look at the median transaction value here what are we trying to see here? Uh what is the median transaction value of a customer who has purchased electronics versus someone who has it? Right? And so it would be something like the box plots that is shown here. Right? So if you see that the average transaction value is higher for a customer who's who's purchased electronics, you know that okay, people who spend more maybe are more likely to buy consumer electronics, right? And so this could be done for all of these variables, all of the variables here. Uh it it each variable that you include in your model helps solve a particular hypothesis. So for example, discounts avail right this the hypothesis it helps you solve is uh does high discount lead to a consumer electronic purchase that's the simple hypothesis that you could solve using your EDA here so post that I think there are various different classification methods I don't want to go into too much detail but yeah I think some some of them are listed here like decision tree random so on XG boost these days you have more uh complex algorithms like like GBM, CAD boost etc. which are uh fairly fairly robust classification methods, right? And so what we try and understand uh again through the confusion matrix or the ROC and EU here and various other metrics also is essentially how how well can you separate out or how well can you predict what are the factors that impact a customer's purchase, right? And so uh one example would be if you look here uh this is essentially the different groups of customers that we've separated out based on are they highly likely to buy not likely to buy or uh uh they they have a medium likelihood of buying right and so if you find a cohort of customers for example the orange ones here let's say uh customers let's say here buy a lot of consumer electronics and they are very similar to to the green cluster of customers who don't buy electronics as much but they are very different from customers blue customers here who also have never purchased consumer electronics so these customers I would not bother targeting right away right these are the customers who are similar and are most likely to purchase because they exhibit similar characteristics to this one right so it's a it's a different way of doing segmentation but uh why we use it is to identify demand that has not already been fulfilled. If you are a customer who buys consumer electronics, you buy headphones, you buy uh let's say AirPods or uh phones for example, but you do buy them on Flipkart, right? How do I get them how do I get them to buy it on on Infra, right? I would have to look at other characteristics and other purchases that they've made. So, this this basically helps uh this process is something that can can help you going about solving that. So I think that's that's what I primarily had. Um yeah I think uh those are some of the use cases. We can can obviously discuss others also but yeah I think we can uh if there are any questions I I've been going on for a while so yeah if there are any questions I can take Oh, hi Scott. Can you can you hear me? Yeah. Yeah. Yeah. Sorry. Yeah. I think I that's that's what I had for today. Yeah. Okay. There are any questions? I could take them out, right? Mhm. So, thanks a lot, Anra. That was a great session and I hope all our attendees found it really helpful. So like just before the Q Q&A before we proceed to the Q&A I would like to request the attendees to please fill in the poll about feed feedback as it helps us to conduct most of sessions. There will be a poll on your screen like [Music] yeah it's live you can just fill it and then we'll take the questions. Yeah. Meanwhile, Andra, you can start taking the questions, I guess. Yeah. So, yeah, I think if I saw a few people who had questions if you have if there's should I just check them from the Q. Okay. What is a So Abu Rahan asks what is transaction in this case? Yes. So a transaction is basically a purchase that you make on an e-commerce site. So let's say I you went to Amazon and let's say I bought a guitar and I bought drums, right? And so now I I made a purchase. These are the two things that I purchased. They belong to certain brands. So all of this information, how much did you pay for them for for each of these items? Which brands they belong to? When did I buy them? All of this is basically transaction data, right? So a transaction is obviously you buying something but what we primarily focus on is all of the data that can be extracted from a particular transaction. Yeah. Uh Adi I think uh yeah can you explain confidence and look again? Sure. So yeah. So yeah I think uh so yeah Adi I think confidence here is uh how often do X and Y occur together? So let's say X and Y is are bread and butter. Okay. Now the the reason why I'm looking at these rule sets is I want to combine certain products together. I want to bundle them together, right? So let's say I'm uh the rule that I'm testing for is what is the impact that bread has on the sales of butter, right? And so the confidence here would be how often do bread and butter occur together divided by how often does only bread occur. Right? And so that that's what the confidence would be. The reason why we're seeing is because if bread occurs in every transaction, right? It does not have an impact on something else also being purchased or for example if you buy butter very often or if you buy eggs very often indep independently also. So you cannot attribute the sales of those eggs to the bread that you purchased along with it. And so that's why we we uh take this confidence measure. And so yeah I think yeah so I think support and confidence would be you know lift is just a derived metric from support and confidence. So that that's the final metric that you would use to rank. So for example if if you see here uh root vegetables right for root vegetables there are three three use cases right root root vegetables with beef with tropical fruit and other vegetables and with citrus fruit right so there are three cases all three have different lifts. So this has 3.29 29. It says 3.14 and 3.04, right? And so whenever someone selects root vegetables, they should be recommended citrus fruit and other vegetables, right? Because it has the highest lift. So that's what we use it for, right? For each of these items in your total basket, what are the best products that go along with it? Right? And so the 3.29 here essentially means you uh again your 3.29 29 times more likely to buy these together than just root vegetables itself. So that's that's what it is. to the next one. Yeah. How do we take into So, Abishek here is asking how do we take into account incentives to buying a bundle while training the data? Okay. So, yeah, I think uh we don't uh so these are two different things, right? So, the incentives are different from how you are bundling. What we are focusing here on is how do you bundle different brands together or different items that can be sold together. For example, the most basic example would be let's say a t-shirt and a jeans or a shirt and a and a pant, let's say, right? Uh you can intuitively bundle them together. But uh incentives are different. So when you create intuitive bundles, they may or may not work, right? So you are spending more but you by making changes on your platform but it does not give you a good enough ROI. So how we go about doing this is for all the customers uh and I would probably go back to the first slide. Yeah. So for each customer we map them to a particular basket right there would be some set of customers who we leave out. Let's say 10 to 20% of the customers we leave out as a control set and we don't show them anything from here right they see what's already live on the platform. One example is let's say during let's say if there's a sale at on Amazon right and you are seeing a particular recommendation of hey buy uh let's say uh let's say buy work wear or formal wear from XYZ brands right that is not something that every customer is seeing only certain cohorts have seen right and so we will find a cohort similar to yours who have not seen this and are seeing what's generally live on the platform And we just do a test and control. Yeah. Yeah. And so we just do a test and control to see what is the lift that is uh that has occurred in your campaign because of bundling these brands together. Right. And so if certain bundles may not do well, right? So for example here PQRST is just five different brand bundles, right? So if basket Q for example had a bunch of customers where these customers actually ended up purchasing let's say lesser than the control customers who were not shown these bundles then this is not a good basket. So we evaluate how these baskets are performing and through the lift in in the campaign right. So yeah, I think that's uh one. Okay. Yeah. Can I use a algorithms to find out frequent patterns? Yes. Yes. That's the Yes, that's the main use case. So it's not frequent exactly. Frequent would be based on how often they occur together. But as I explained earlier, there are problems with with uh frequently occurring patterns also because of the individual occurrences. And so that's why a priority is a alternative [Music] is no I I'll you can check the formula lift is just a derived metric we primarily focus on supportly [Music] bought together frequently bought together. Okay. So uh there are there are multiple algorithms here. Again um you can use collaborative filtering to find out which brands to recommend or which items to recommend to a particular customer. That's that's very common. And then you can aggregate them together into different baskets of items, right? So that's what that's similar to what you see on Amazon. Uh people also purchased and or often bought together is the section in Amazon where you would see these uh frequently bought together cases. they they use these kind of algorithms. What's the ML algo used? Collaborative filtering is the algo used. How do we deal with the problem of data sharing? So data sharing is not really a problem. We we have GDPR rules and there there are all kinds of rules um for data sharing. So it depends from company to company. If you're an Indian company or or a US company, it varies. But yeah, I think the government already has data sharing practices in place. So that's that's fine. How to code cluster? I can take any further sessions but I primarily work on our but yeah I can take sessions with code also. A lot of customers buy one category of items from another products platforms. How can you analyze them on their preferences? Yes. So yeah here. So we don't know if they make purchases on other platforms. SB uh yeah we we don't know if they make or don't make purchases from other platforms. We do know that there is a share of wallet customers have. So if you spend uh let's say let's say 5,000 on every footwear purchase you make you can spend let's say 10% or 20% of that on on a belt that you might purchase along with it. Right? So the customer always has some share of wallet for related items that they're purchasing from elsewhere. So what we try and see is we look at the people who actually purchase in this case from Myntra and u and we look at the people who haven't and if they are very similar customers it's similar to a like analysis. So if they're very similar customers we are going to recommend them also products that you already purchased. So propensity is like binary classification like buy or not. Yes. So it's it's not necessarily binary. It depends on your use case. I've just put a binary classification model because it's simple to explain. But different uh there could be different uh labels for class. So it could be a multi-level classification. So uh can we use a priaryy for building upselling and cross-selling models? Yes. I think the one of the most common use cases for upselling and cross-selling is a priority. Yeah. So that's something we can we that's the primary use case for that. Yes. These a hands-on session sure if yeah there's a chance it could you explain one of the mand ML models used practically how it worked with the output I can do that in a different session but yeah I there are some uh the reason why I've kept the uh some of the details vague is because I cannot share some details from I think yeah no I think that's I can use for others I think That's that's it. Okay. Yeah. Yeah. So, thanks a lot, Anurra. On behalf of analytics, thank you for Yeah. And I'm sure our audience found it insightful and helpful. Hopefully, we can conduct more sessions with you in the future. Sure. Sure. So, guys, we have already mentioned Anurag's LinkedIn profile in the chat chat section. So, you can you people can connect to him over there. And we will be back with another session of data on like uh tomorrow 15th of September. So you guys can register for that too. And thank you so much Anurra for your time and the session was really helpful and it was really great. I personally enjoyed it a lot. It was very informative. Yeah. So thank you guys. Take care and bye. Thank you everyone. Thank you everyone for joining. Really appreciate it.
Original Description
Practical Applications od Data Science in Ecommerce
In this DataHour, Anurag Nair(Analytics Manager at Myntra), is going to demonstrate the use cases that leverage data science frameworks for driving higher revenue through improved personalization and demand discovery.
Prerequisites: Enthusiasm for learning and intermediate knowledge of Data Analytics.
🔗 More action pack session here: https://datahack.analyticsvidhya.com/contest/all/
Stay on top of your industry by interacting with us on our social channels:
Follow us on Instagram: https://www.instagram.com/analytics_vidhya/
Like us on Facebook: https://www.facebook.com/AnalyticsVidhya/
Follow us on Twitter: https://twitter.com/AnalyticsVidhya
Follow us on LinkedIn:https://www.linkedin.com/company/analytics-vidhya
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Analytics Vidhya · Analytics Vidhya · 7 of 60
1
2
3
4
5
6
▶
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
The DataHour: Data Science in Retail
Analytics Vidhya
The DataHour: Anomaly detection using NLP and Predictive Modeling
Analytics Vidhya
The DataHour: Energy Data Science Project from Scratch
Analytics Vidhya
The DataHour: Explainable AI Need and Implementation
Analytics Vidhya
The DataHour: Google Cloud AI/ML
Analytics Vidhya
Prediction to Production in Machine Learning #machinelearning #prediction
Analytics Vidhya
Practical Applications of Data science in Ecommerce
Analytics Vidhya
How to tackle Overfitting?#machinelearning #overfitting
Analytics Vidhya
Building Data Pipelines on GCP #googlecloud #datapipelines #data
Analytics Vidhya
Hands-on with A/B Testing #abtesting #datascience
Analytics Vidhya
Efficient Implementations of Transformers #transformers #cnn #machinelearning
Analytics Vidhya
Modern Deep Learning Architecture #deeplearning #architecture #deeplearningtutorial
Analytics Vidhya
Key steps for Designing Artificial Neural Network (ANN) for Image classification #machinelearning
Analytics Vidhya
5 things you should know about Azure SQL #azure #sql #datahour #datascience
Analytics Vidhya
AI & ML in the Automotive Industry #machinelearning #ai
Analytics Vidhya
Building Machine Learning Models in BigQuery
Analytics Vidhya
NLP aspects in Telecommunication Industry
Analytics Vidhya
Practical Time Series Analysis
Analytics Vidhya
Fundamentals of Quantum Computing
Analytics Vidhya
A DAY IN THE LIFE of a Data Scientist (From waking up to working on algorithms)
Analytics Vidhya
Classification Machine Learning Model from Scratch
Analytics Vidhya
Knowledge Graph Solutions using Neo4j
Analytics Vidhya
Model Guesstimation (MLOps)
Analytics Vidhya
ETL Pipelines in Google Cloud Platform
Analytics Vidhya
Key steps for Designing Convolutional Neural Network(CNN) for Image Classification
Analytics Vidhya
Getting Started with AWS EC2 #amazon #aws
Analytics Vidhya
How to Use Azure NLP and Graph Databases for Intelligent Knowledge Mining
Analytics Vidhya
Certified AI & ML BlackBelt Plus Program #shorts
Analytics Vidhya
Visualizing Data using Python #machinelearning #visualization #python
Analytics Vidhya
DCNN for Machine RUL Prediction using Time-series Data #timeseries #machinelearning #datascience
Analytics Vidhya
M in ML stands for Math & Magic
Analytics Vidhya
An Unsupervised ML approach using Clustering
Analytics Vidhya
Customizing Large Language Models GPT3 for Real-life Use Cases #gpt3 #datascience
Analytics Vidhya
Model Parameters vs Hyperparameters - Techniques in ML Engineering #machinelearning
Analytics Vidhya
Practical MLOps #mlops #datascience
Analytics Vidhya
Data Engineering with Databricks #dataengineering #databricks
Analytics Vidhya
Multi-Objective Optimisation
Analytics Vidhya
When Airflow Meets Kubernetes
Analytics Vidhya
AI in Banking
Analytics Vidhya
Learn Convolutional Neural Network for Image Recognition
Analytics Vidhya
Extracting Value from Data
Analytics Vidhya
How to measure Marketing Channel Effectiveness
Analytics Vidhya
Transforming Lives | Data Science Immersive Bootcamp
Analytics Vidhya
Stock Market Analysis - AI driven approach
Analytics Vidhya
Become a Data Engineering Professional in 2022 | Future Trends + Skills Required
Analytics Vidhya
Ensemble Techniques in Machine Learning #machinelearning #ensemble #datascience
Analytics Vidhya
The Power of Visualization | Tableau Full Course | Analytics Vidhya
Analytics Vidhya
Demand for Data Engineers is on the Rise | Data Engineer | Analytics Vidhya
Analytics Vidhya
Data Visualization in Data Science | DataHour | Analytics Vidhya
Analytics Vidhya
Role of Optimization in Machine Learning & Deep Learning | DataHour | Analytics Vidhya
Analytics Vidhya
Solving any Machine Learning Problem | Approach and Steps Involved
Analytics Vidhya
Topic Modeling Explained with Implementation | Using LDA in Python | DataHour by Arpendu Ganguly
Analytics Vidhya
Data Engineering in E-Commerce | The Best Case Study
Analytics Vidhya
Introduction to Classification using Azure Machine Learning | DataHour | Analytics Vidhya
Analytics Vidhya
Introduction to Federated Learning | DataHour | Analytics Vidhya
Analytics Vidhya
Diffusion Models for Generative Arts | DataHour | Analytics Vidhya
Analytics Vidhya
Master Google Analytics in 1 Hour | DataHour | Analytics Vidhya
Analytics Vidhya
Learn Hypothesis Testing | DataHour | Analytics Vidhya
Analytics Vidhya
A Practical Approach to Kaggle Competition | DataHour | Analytics Vidhya
Analytics Vidhya
Making AI work for Business | DataHour | Analytics Vidhya
Analytics Vidhya
More on: Data Literacy
View skill →Related Reads
📰
📰
📰
📰
Half of Data Engineering Jobs on LinkedIn Aren't Real
Dev.to · DataDriven
Evolutionary Data Through Schemaboi: Achieving Forward, Backwards, and Sideways Compatibility
InfoQ AI/ML
How Morphohack Helped Me Recover €678,000 in Lost Crypto Assets
Medium · Data Science
10 awk and sed Techniques Every Data Analyst Should Know for Data Cleaning and Transformation
Medium · Data Science
🎓
Tutor Explanation
DeepCamp AI