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

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

## Apriori Candidates generation:

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

**Step 1: **

**self-joining**

## Example ofÂ self-joining

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

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

*V X Â Y Â Z***Step 2:Â **

**Apriori pruning principle:**

## Example ofÂ Apriori pruning principle

V W X Y Z*X=*{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 E1*C1=*{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

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