O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Obtaining the topN purchased items

Even before we run any association rules we can obtain counts of the topN items, as shown in the first plot.

If we are looking for items with a specified support level, we can include that as a parameter to the function as well.

The second plot is another way of plotting the items, which specifies support as a filter, and it indicates higher support for bags, boxes, cases, and holders:

par(mfrow = c(1, 2), bg = "white", col = c("blue")) itemFrequencyPlot(trans4, topN = 10, type = "absolute", cex.names = 0.7) itemFrequencyPlot(trans4, support = 0.2, cex.names = 0.75) 

Reset the graphics parameters. The output ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required