**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 |

**Example:**

Transaction 1 showing an itemset containing items like Tea, Cake, Cold Drink.

Transaction 2 showing an itemset containing items like Tea, Coffee, Cold Drink.

Transaction 3 showing an itemset containing items like Eggs, Tea, Cold Drink.

Transaction 4 showing an itemset containing items like Cake, Milk, Eggs.

Transaction 5 showing an itemset containing items like Cake, Coffee, Cold Drink, Milk, Eggs.

**What is K-itemset?**

When K=1, then K-Itemset is itemset 1.

When K=2, then K-Itemset is itemset 2.

When K=3, then K-Itemset is itemset 3.

When K=4, then K-Itemset is itemset 4.

When K=5, then K-Itemset is itemset 5.

**What is a frequent itemset?**

An itemset is *frequent* if its support is no less than “minimum support threshold”. Minimum support is always supposed according to the choice. You can select any minimum support to decide that the itemset is frequent or not.

**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.

## Next Similar Tutorials

- Frequent pattern Mining, Closed frequent itemset, max frequent itemset in data mining – Click Here
- Support, Confidence, Minimum support, Frequent itemset, K-itemset, absolute support in data mining – Click Here
- Apriori Algorithm in Data Mining with examples – Click Here
- Apriori principles in data mining, Downward closure property, Apriori pruning principle – Click Here
- Apriori candidates’ generations, self-joining, and pruning principles. – Click Here.