Association Mining and various terminologies associated with it

Let’s continue our learning

In this blog we will discuss the very interesting and useful topic of machine learning i.e Association Mining .

Image for post
Image for post

What is Association Mining?

Association mining is the technique of finding association between commodities . It tries to extract the relationships i.e association between different kinds of commodities . Let see what is -

Association Rule Learning:

Association rule learning is a machine learning method that uses a set of rules to discover interesting relations between variables in large databases i.e. the transaction database of a store. It identifies frequent associations among variables called association rules that consists of an antecedent (if) and a consequent (then).

Objective of Association Mining

The task of associations rule learning is to discover the relationships and identify the rules of association.

Association rule learning algorithms are used extensively in data mining for market basket analysis, which is determining dependencies among various products purchased by the customers at different times analyzing the customer transaction databases.

Association rule mining algorithms

There are two basics algorithms for association learning or mining .

  1. Apriori Algorithm
  2. Eclat Algorithm

Important terminologies

There are some important terminologies that are used by these algorithms which are as follows:-

1.Support: Support is the rate of the frequency of an item appears in the total number of items. Like the frequency of burger among all the transactions. Mathematically, for an item A will be given as -

Image for post
Image for post

2.Confidence: Confidence is the conditional probability of occurrence of a consequent (then) providing the occurrence of an antecedent (if). It’s kind of testing a rule. Like if a customer buys a burger(antecedent), he is supposed to buy french fries(consequent). Mathematically, the confidence of B given A will be given as-

Image for post
Image for post

3.Lift: Lift is the ratio of confidence and support. It tells how likely an item is purchased after another item is purchased. Simply it is the likelihood to buy french fries if a customer buys a burger. Mathematically, the lift is given as -

Image for post
Image for post

Working of association mining algorithm i.e Apriori algorithm

Step 1: Set a minimum support and confidence.

Step 2: Take all the subsets in transactions having support than minimum support.

Step 3: Take all the rules of these subsets having higher confidence than minimum confidence.

Step 4: Sort the rules by decreasing lift.

Example for understanding the working of Apriori algorithm ias follows :

Suppose we have the data record of some customer’s purchase from the supermarket.Our aim is to find possible associations from the given database.


First, we will calculate the frequency table for the itemset

Image for post
Image for post
Item names with its corresponding frequencies

Step 1: Let’s say we have set the minimum support and confidence to 15% , i.e 15% of 22 will be 3.3 .

Image for post
Image for post

That means no items having support less than 15% or frequency less than 3.3 will be incurred .

Then we are left with the following items .

Image for post
Image for post

Step 2: Now our possible subsets for the above itemsets will be -

Image for post
Image for post

Step 3:Select the subsets having higher confidence and that is {Burger, French Fries} or Burger → French Fries .

Step 4: As we are left with only one rule we calculate the lift for this rule and that is approximately 3.7 .

Applications of association rule mining

  • Supermarket items association analysis .
  • Web mining
  • Medical Analysis
  • Bioinformatics
  • Network Analysis
  • Programming pattern finding , etc .


In this blog I tried to cover the topics-What is Association Mining , its objectives , association rule mining concept and its algorithms , important terminologies used in association mining , working of association mining algorithm with suitable example and it’s applications in the real world.

This is all about Association Mining . Here comes the end of this blog.


Written by

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store