You are on page 1of 3

What Is An Itemset?

A set of items together is called an itemset. If any itemset has k-items it is called a k-itemset. An itemset
consists of two or more items. An itemset that occurs frequently is called a frequent itemset. Thus
frequent itemset mining is a data mining technique to identify the items that often occur together.

For Example, Bread and butter, Laptop and Antivirus software, etc

Frequent Itemset Mining:

Finding frequent patterns, associations, correlations, or causal structures among sets of items or objects
in transaction databases, relational databases, and other information repositories.
Given:
– A set of items 𝐼 = {𝑖1, 𝑖2, … , 𝑖𝑚}
– A database of transactions 𝐷, where a transaction 𝑇 ⊆ 𝐼 is a set of items

Support and Confidence can be represented by the following example:

Bread=> butter [support=2%, confidence-60%]

The above statement is an example of an association rule. This means that there is a 2% transaction that
bought bread and butter together and there are 60% of customers who bought bread as well as butter.

Support and Confidence for Itemset A and B are represented by formulas:

Formula for Support and Confidence for Itemset A and B

What is itemset?
An itemset is a set of one or more items.

Transaction ID Items bought


1 Tea, Cake, Cold Drink

2 Tea, Coffee, Cold Drink

3 Eggs, Tea, Cold Drink

4 Cake, Milk, Eggs

5 Cake, Coffee, Cold Drink, Milk, Eggs

What is support or absolute support?


The absolute number of transactions which contains an itemset.
For example;

Absolute Support of Tea: 3


Absolute Support of Cake : 3
Absolute Support of Cold Drink: 4
Absolute Support of Milk: 2
Absolute Support of Eggs: 3
Support that if a person buy Tea, also buy Cake : 1 / 5 = 0.2 = 20%
Support that if a person buy Tea, also buy Cold Drink : 3 / 5 = 0.6 = 60%
The support that if a person buys Eggs, also buy Cold Drink: 2 / 5 = 0.4 = 40%
and similarly, we can calculate support for all itemsets.

What is relative support?


The relative number of transactions which contains an itemset relative to the total transactions.
Formula:
Total number of transactions containing an itemset X / Total number of transactions
Relative Support of Tea: 3 / 5 = 0.6
Relative Support of Cake : 3 / 5 = 0.6
Relative Support of Cold Drink : 4 / 5 = 0.8
Relative Support of Milk : 2 / 5 = 0.4
Relative Support of Eggs: 3 / 5 = 0.6

What is confidence?
Confidence is the probability that if a person buys an item A, then he will also buy an item B.

● Confidence that if a person buy Tea, also buy Cake : 1 / 3 = 0.2 = 20%
○ Why 1? because Tea and Cake occur together only in 1 transaction
○ Why 3? because there are three transactions in which Tea is occurring.
● Confidence that if a person buy Cake, also buy Tea : 1 / 3 = 0.2 = 20%.
○ Why 1? because Tea and Cake are occurring together only in 1 transaction
○ Why 3? because there are three transactions in which Tea is occurring.
● Confidence that if a person buy Milk, also buy Tea : 0 / 2 = 0 = 0%
○ Why 0? because Milk and Tea are not occurring together in any transaction
○ Why 2? because there are 2 transactions in which Milk is occurring
and similarly, we can calculate confidence for all itemsets.

You might also like