Reputation: 1
I am dealing with a dataset having 614 variables and 1348 transactions and trying to run it in R, but, the process time is too high that the code is never showing the final output and my laptop is hanging.
a <- read.csv("v.csv")
library(arules)
for(i in 1:ncol(a))
a[i]<- as.factor(a[,i])
rules <- apriori(a,parameter=list(supp = .5 , conf = 0.9, target="rules"))
summary(g)
Please tell me where I am going wrong.
Upvotes: 0
Views: 674
Reputation: 3075
I think your issue could be related to the data. I think some of your variables in a
might be continuous variables and as.factor
will create a factor value for each of the unique values. apriori will then try to convert each factor value into an individual item creating an extremely large matrix which causes your laptop to hang.
Note: This is pure speculation since I do not know how your data looks like.
Upvotes: 1