3. MARKET BASKET ANALYSIS
A market basket analysis or
recommendation engine is what is behind all these
recommendations we get when we go shopping online
or whenever we receive targeted advertising. The
underlying engine collects information about people’s
habits and knows that if people buy pasta and wine,
they are usually also interested in pasta sauces. So, the
next time you go to the supermarket and buy pasta
and wine, be ready to get a recommendation for some
pasta sauce!.
4. About MBA:
The first one is antecedent(previous) and
the second is consequent(resultant) and few
measures such as support, confidence and lift,
define how reliable the rule is this, so the most
famous algorithm generating these rules in the
1. Apriori algorithm.
2. FP growth.
3. Partitioning method, etc.
5. Association Rule Mining
ARM has transaction data that contains sequence of
PRODUCT_ID in fictitious baskets which also contains
PRODUCT_INFO, NAME and PRICE.
6. Now we are going to see
•APRIORI ALGORITHM
•FP GROWTH
8. It has two steps, Join & Prune and it has minimum support count: 2
This is sample data ( ‘T’ is transaction data, ‘T1’ to ‘T9’).
T1 1, 2, 5
T2 2, 4
T3 2, 3
T4 1, 2, 4
T5 1, 3
T6 2, 3
T7 1, 3
T8 1, 2, 3, 5
T9 1, 2, 3
Transaction Items
9. Join step:
Here u have to do cross join the five items as, 1 with 1, 1 with 2, 1 with 3,
1 with 4, 1 with 5, 2 with 3, 2 with 4, 2 with 5, 3 with 4, 3 with 5, 4 with 5.
1. T1 1, 2, 5
2. T2 2, 4
3. T3 2, 3
4. T4 1, 2, 4
5. T5 1, 3
6. T6 2, 3
7. T7 1, 3
8. T8 1, 2, 3, 5
9. T9 1, 2, 3
Prune step:
• Cut down method, first we count all the five item in all the transaction.
I1 6
I2 7
I3 6
I4 2
I5 2
• This are all the minimum support count: 2
11. Step: 2
Now again sorted list CROSS JOIN STEP arranging I1, I2, I3, I4 & I5, from the previous step,
I1 I2 I3 2
I1 I2 I4 1
I1 I2 I5 2
I1 I3 I4 0
I1 I3 I5 1
I1 I4 I5 0
I2 I3 I4 1
I2 I4 I5 0
I2 I1 I3 1
I2 I1 I4 0, it will continue as more possibilities.
12. Result:
• So this is the frequent patterns of purchase item, my customer will purchase the maximum
item.
I1 I2 I3 2
I1 I2 I5 2
• These two combination are the max purchase item find using “APRIORIY ALGORITHM”.
• Even it has a disadvantages because of so many useless combination of items, again and
again.
--------- x ---------
QuickStarter has created an outline to help you get started on your presentation. Some slides include information here in the notes to provide additional topics for you to research.
QuickStarter has created an outline to help you get started on your presentation. Some slides include information here in the notes to provide additional topics for you to research.