Apriori algo is not working, giving an error : x contains 0 itemsets

43 Views Asked by At

I have two variables: unique ids and a list of diagnostic related groups name and was using apriori algo. to understand the what goes with what.

trans <- transactions(new_df)
as(trans,"transactions") 
summary(trans)
inspect(trans[1:20])
its <- apriori(trans, parameter=list(target = "frequent"))
plot(head(its, n = 12), method = "graph")

I get an error as soon as I run last line: Error in plot.itemsets(head(its, n = 12), method = "graph") : x contains 0 itemsets!

Not able to understand the steps that I may have missed. How do I fix this error?

0

There are 0 best solutions below