1

I am using apriori algorithm to extract frequent itemsets and then performing a Market Basket Analysis.

As an input for the apriori, I have to perform a one_hot encoding on my dataset: the quantities are ignored.

enter image description here

Is there a way to perform Market Basket Analysis using an algorithm that takes in account the quantity of the products?

ardito.bryan
  • 429
  • 9
  • 22
  • Did you find a solution for this? I also want to do quantitative market basket analysis. I found the below link, but that converts all the positive values to 1. – programmer1 Dec 03 '20 at 19:29

1 Answers1

1

Apriori algorithm does take into account 'Quantity' column. You can refer to this article https://pbpython.com/market-basket-analysis.html. If you don't have 'Quantity' column and want to create one then just add a column and set all the rows as 1

Sasha18
  • 65
  • 8
  • I've read the article you've provided but couldn't find any explicit reference to how it handles the quantity. Any chance you can explain this bit? Thank you. – user2331197 Dec 10 '20 at 15:39