Market Basket Analysis or Association Rules or Affinity Analysis or Apriori Algorithm

First of all, if you are not familiar with the concept of Market Basket Analysis (MBA), Association Rules or Affinity Analysis and related metrics such as Support, Confidence and Lift, please read this article first.

Here is how we can do it in Python. We will look at two examples-

Example 1-

Data used for this example can be found here Retail_Data.csv

mba1mba2mba3

Example 2-

MBA4MBA5MBA6

Cheers!

3 thoughts on “Market Basket Analysis or Association Rules or Affinity Analysis or Apriori Algorithm

  1. Pingback: Learn Data Science using Python Step by Step | RP's Blog on data science

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s