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

### how to calculate support and confidence in data mining?

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

**Frequently Asked Questions (FAQ)**

**How do you find the minimum support count in apriori algorithm?**

A minimum support threshold can be applied to get all thefrequent itemsets in a dataset.

A minimum confidence constraint can be applied to these frequent itemsets if you want to form rules.