Visiting shopping malls has been a part of our routine.A lot of us love shopping and prefer it during leisure.Let us consider an example of the supermarket,many a times we end up buying something which we had not planned to.How did we end up finding it?How did they manage to attract us towards an unplanned purchase?Let us find out the answers to all our unanswered queries.
What is Market basket analysis?
Market Basket Analysis is one of the fundamental techniques used by large retailers to uncover the association between items. In other words, it allows retailers to identify the relationship between items which are more frequently Acquire together.
The market-basket model of data is use to describe a common form of many- many relationship between two kinds of objects. On the one hand, we have items, and on the other we have baskets, sometimes called “transactions”. Each basket consists of a set of items (an itemset), and usually we assume that the
number of items in a basket is small – much smaller than the total number of items. The number of baskets is usually assume to be very large, bigger than what can fit in main memory. The data is assume to be represent in a file consisting of a sequence of baskets. In terms of the distributed file system the baskets are the objects of the file, and each basket is of type “set of items.”
Association Rules:
An example of Association Rules:-
- Assume there are 1000 customers
- 100 of them bought shampoo, 80 bought conditioner and 60 bought both of them.
- bought shampoo => bought conditioner
- support = P(shampoo & conditioner) = 60/1000 = 0.06
- confidence = support/P(conditioner) = 0.06/0.08 = 0.75
- lift = confidence/P(shampoo) = 0.75/0.10 = 7.5
This example is extremely small representation. In reality, a rule needs the support of several hundred transactions, before it can be consider statistically significant, and datasets often contain thousands or millions of transactions.
For instance, market basket analysis may help you design different store layouts. In one strategy, items that are frequently purchase together can be place in proximity to further encourage the combined sale of such items. If customers who purchase computers also tend to buy antivirus software at the same time.
then placing the hardware display close to the software display may help increase the sales of both items. The discovery of interesting correlation relationships among huge amounts of business transaction records can help in many business decision-making processes such as catalog design, cross-marketing, and customer shopping behavior analysis.
1. Frequent Itemsets, Closed Itemsets:
A set of items is refer to as an itemset. An itemset that contains k items is a k-itemset. The occurrence frequency of an itemset is the number of transactions that contain the itemset. This is also , simply, consider as the frequency, support count, or count of the itemset.
Support :This is the percentage of orders that contains the item set.
2. Confidence:
Given two items, A and B, confidence measures the percentage of times that item B is purchased, given that item A was purchased. Confidence values range from 0 to 1, where 0 indicates that B is never purchased when A is purchased, and 1 indicates that B is always purchased whenever A is purchased. Note that the confidence measure is directional. This means that we can also compute the percentage of times that item A is purchased, given that item B was purchased:
3. Lift:
Unlike the confidence metric whose value may vary depending on direction (eg: confidence{A->B} may be different from confidence{B->A}), lift has no direction. This means that the lift{A,B} is always equal to the lift{B,A}
We can summarize this as:
- Lift = 1; implies no relationship between A and B (i.e., A and B occur together only by chance)
- Lift > 1; implies that there is a positive relationship between Aand B(i.e., A and B occur together more often than random)
- Lift < 1; implies that there is a negative relationship between A and B(i.e., A and B occur together less often than random)
CONCLUSION:
However, We see that the top associations are not surprising, with one flavor of an item being purchased with another flavor from the item belonging to the family . As mentioned, one common application of association rules mining is in the domain of recommending systems.
Once item pairs have been identified as having positive relationship, recommendations can be made to customers in order to increase sales. And hopefully, along the way, also introduce customers to items they never would have tried before or even imagined existed!
written by: Shrushti Hegde
reviewed by: Shivani Yadav
If you are Interested In Machine Learning You Can Check Machine Learning Internship Program
Also Check Other Technical And Non Technical Internship Programs