0

Hi i have only variables like date of purchase, price, sales and category and brand. I need to do market basket analysis for brand = "a" and brand = "b" with pasta category separate separately.

I have done mba with all items like bread, butter, milk etc. however, this is tricky. I have researched and came to know that we need to discretize numerical variables in R. DiD it. Don't know if this is the correct data to do basket analysis. Can anyone share your updates quickly. Think of the data in excel sheet.

Brand  = A
Category = pasta
price = 34
sales =1

.

Nirmal
  • 45
  • 6
  • Welcome to SO! Check this post on how to share a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – Karthik Arumugham Feb 22 '17 at 10:44
  • To do market basket analysis, you'd need a unique identifier like a invoice no to group the different items bought by a customer in a single transaction. – Karthik Arumugham Feb 22 '17 at 10:49

1 Answers1

0

I found the answer. In order to do the market basket, we need to have a unique value in our data set. (bill no in my case). I have splitted the data, converted into transactions and used apriori algorithm.

Nirmal
  • 45
  • 6