From the course: Data Science Foundations: Data Mining in R

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Apriori

Solution: Apriori

From the course: Data Science Foundations: Data Mining in R

Start my 1-month free trial

Solution: Apriori

(upbeat music) - I invited you to conduct an Apriori association analysis on a dataset called EPUB from the A rules package. Let's take a look at how I solved this one and we can compare our work. I'm going to start by loading the packages, setting a random seed and then getting that same information about the EPUB dataset that we had before. We'll get loaded into data, get the structure get the summary with the top five items and save it to an object called DF. The important part here is getting the rules and this is where we use the Apriori algorithm. And we specify the parameters of support minimum level of support, which I've set to O O one and minimum level of confidence, point seven five. We'll run that and save it in rules. Then let's get the number of rules that were created. It actually created only three rules from this particular dataset three rules that met those particular parameters that I specified.…

Contents