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.
Asked
Active
Viewed 862 times
-3
-
3#Hi! Welcome to SO. Please read - [How to make a great R reproducible example?](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example), in your case, can you provide us the important piece of code and what the error is? Also, a small sample of your data? – Shique Jun 04 '18 at 07:04
-
Which version of R are you using? 32 or 64 bit? – s__ Jun 04 '18 at 07:14
-
1Do you need all your 21 million observations? Maybe a sample would be sufficient? – FilipW Jun 04 '18 at 07:59
1 Answers
0
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

Aniket Rangrej
- 192
- 1
- 7
-
Thank you, however, i resolved my problem by taking customers who had ordered more than 3 times in 4 months, with shortened my data. – mragakshi agarwal Jun 11 '18 at 12:22