# In this tutorial, we will try to answer the following questions;

1. What are the Apriori candidate’s generations?
2. What is self-joining?
3. what is the Apriori pruning principle?

## Apriori Candidates generation:

Candidates can be generated by the self joining and Apriori pruning principles.

## Example ofÂ self-joining

V W X Y ZX={V W X, Â  Â V W Y, Â  Â V X Y, Â  Â V X Z, Â  Â W X Y}Self-joining =Â XÂ * XV Â W X YÂ from V W XÂ and V W YV X Â Y Â ZÂ from V X YÂ and V X Z

So frequent candidates areÂ V Â W X YÂ  andÂ V X Â Y Â Z

## Example ofÂ Apriori pruning principle

V W X Y ZX={V W X, Â  Â V W Y, Â  Â V X Y, Â  Â V X Z, Â  Â W X Y}Â According to Apriori Pruning principle V X Y ZÂ is removed because V Y ZÂ is not in X.Â

So frequent candidate is V W X Y

## Apriori Candidates generation

Candidates can be generated by the self joining and Apriori pruning principles.

## Step 1:

### Self-joining of Apriori Candidates

#### Example ofÂ self-joining

A1 B1 C1 D1 E1

C1={A1 B1 C1, Â  Â A1 B1 D1, Â  Â A1 C1 D1, Â  Â A1 C1 E1, Â  Â B1 C1 D1}

Self-joining =Â C1Â * C1A1 Â B1 C1 D1Â from A1 B1 C1Â and A1 B1 D1A1 C1 Â D1 Â E1Â from A1 C1 D1Â and A1 C1 E1

So frequent candidates areÂ A1 Â B1 C1 D1Â  andÂ A1 C1 Â D1 Â E1

## Step 2:Â

### Apriori pruning principle

#### Example ofÂ Apriori pruning principle

A1 B1 C1 D1 E1C1={A1 B1 C1, Â  Â A1 B1 D1, Â  Â A1 C1 D1, Â  Â A1 C1 E1, Â  Â B1 C1 D1}Â According to Apriori Pruning principle A1 C1 D1 E1Â is remoA1ed because A1 D1 E1Â is not in C1.Â

So frequent candidate is A1 B1 C1 D1.

## Next Similar Tutorials

1. Frequent pattern Mining, Closed frequent itemset, max frequent itemset in data mining – Click Here
2. Support, Confidence, Minimum support, Frequent itemset, K-itemset, absolute support in data mining – Click Here
4. Apriori principles in data mining, Downward closure property, Apriori pruning principle – Click Here
Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,