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

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 - Python Tutorial

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

Start my 1-month free trial

Solution: Apriori

(upbeat music) - [Instructor] Hopefully you've been able to take a few minutes and work through the challenge of applying the Apriori algorithm to the Epub dataset. I want to show you how I solved it and you'll see that it follows the pattern of the original demonstration we had on Apriori. To do this, once you have the apyori library installed, we're going to load a few libraries and algorithms. Then we will load the data set and we're going to do it in the list format where we show the things that people put down here. Now, this is actually three different transactions. It just happens to be that each transaction includes just one item. And all of them go by doc, document, and then an ID, 154, 3d6, 16f. These are ways of identifying the documents. Again, the first three transactions each have just one item and these are those items. But let's apply the Apriori algorithm to this data set. To do this, we set minimum…

Contents