rapriorimarket-basket-analysis

How to use apriori algorithm in R, for large data set?


I have been working on market basket analysis, by apriori approach in R, data contains 12 variables with 21,00,000 observations, my laptop has 4 GB RAM, my R code is not running for converting data into transactions. Please, help.


Solution

  • I have worked on apriori algorithm for larger datasets in the past. I faced the similar issue. To solve it temporarily, I used sampling. Later I changed it into few lines of spark implementation which solved my problem permanently.

    https://spark.apache.org/docs/1.6.0/mllib-frequent-pattern-mining.html