Reader small image

You're reading from  R Machine Learning By Example

Product typeBook
Published inMar 2016
Reading LevelIntermediate
Publisher
ISBN-139781784390846
Edition1st Edition
Languages
Tools
Right arrow

Association rule mining


We will now be implementing the final technique in market basket analysis for finding out association rules between itemsets to detect and predict product purchase patterns which can be used for product recommendations and suggestions. We will be notably using the Apriori algorithm from the arules package which uses an implementation for generating frequent itemsets first, which we discussed earlier. Once it has the frequent itemsets, the algorithm generates necessary rules based on parameters such as support, confidence, and lift. We will also show how you can visualize and interact with these rules using the arulesViz package. The code for this implementation is in the ch3_association rule mining.R file which you can directly load and follow the book.

Loading dependencies and data

We will first load the necessary package and data dependencies. Do note that we will be using the Groceries dataset which we discussed earlier in the section dealing with advanced contingency...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
R Machine Learning By Example
Published in: Mar 2016Publisher: ISBN-13: 9781784390846