Reputation: 306
I am working in R apriori algorithm which have a function ItemFrequencyPlot() of arules library.
This function create a plot by passing argument (topN).Here we pass (Top N =20) which plot the top 20 items.Basically the function find top items on the basis of frequency.The function returns plot image which have top items.
Now My Question is that who assigns these top items to a vector or how we get these top items in order to perform additional operation.enter image description here
Upvotes: 3
Views: 1328
Reputation: 1176
If you want to get the most frequent items, you can use the function itemFrequency
. To get the absolute count of the 20 most frequent items, try
itms <- itemFrequency(myTransactions, type = "absolute")
head(sort(itms, decreasing = TRUE), n = 20)
Upvotes: 3