Professional Documents
Culture Documents
Assignment #1: Market Basket Analysis Group Details: 3 Shreyas Naik (15A3HP626) Parul Walia (15A3HP628)
Assignment #1: Market Basket Analysis Group Details: 3 Shreyas Naik (15A3HP626) Parul Walia (15A3HP628)
Assignment #1: Market Basket Analysis Group Details: 3 Shreyas Naik (15A3HP626) Parul Walia (15A3HP628)
GROUP DETAILS: 3
1
Statement of the problem:
To create a smart basket which has list of item which are frequently purchased
(recommendation) and suggest likely products missed based on their association with selected
items.
2
Methodology Adopted:
Firstly, we need to convert the flat data into a stacked data set using the following syntax in
BASE SAS.
/**********************************************************************
data grocery.transform;
set bigbasket;
array item (32) Product1-Product32;
do i=1 to 32;
Item_number=i;
if item(i)~="" then do;
Product=item(i);
keep ID Item_number Product;
output;
end;
end;
run;
The stacked data takes the form as below. (Example shown for four transactions)
3
This stacked data was used in E-Miner to form association with ID variable as ID and Product
variable as Target.
Analysis:
The frequency of the Product variable (TOP 30) and (BOTTOM 10) in the stacked data set is as
below.
4
Table 1. Frequency of top 30 items
5
Association:
7.58 transactions contain whole milk and other vegetables out of 9835 transactions
which is 7.58%.
The 29.29% confidence defines that out of 100 times the customer has bought whole
milk, 29.29 times other vegetable was also bought.
The chances of person buying whole milk increases once the customer buys other
vegetables (other vegetables ==> whole milk , confidence = 38%)
In three product association, person buys whole milk with more probability once yogurt
and other vegetables is bought.
Table 3. Association (confidence >= 40% and support >= 2% or support > 5 and confidence >= 25%)
6
Recommendation:
The recommendation list should contain top 30 items purchased as shown in the
frequency above.
Milk products, vegetables, beer can be placed together for easy navigation.
The ‘did you forget’ list should contain below goods based on association rule
conducted.
If whole milk bought but did not buy other vegetables(s=7.48%, c=29.29%) and vice
versa is also true.
Whole milk should also be added to the cart of did you forget if selected yogurt, root
vegetables, tropical fruit, sour cream, domestic eggs, curd and margarine. (confidence
>= 40% and support >= 2% or support >= 5 and confidence >= 25%)
Similarly create a threshold (confidence >= 40% and support >= 2% OR support >= 5
and confidence >= 25%) and add all the R.H.S products if not selected when L.H.S
products are selected.