Apriori is an algorithm for learning association rules. Apriori Algorithm in data mining is designed to operate on databases containing transactions (for example, collections of items bought by customers, or details of a website frequentation). Apriori uses a “bottom-up” approach, where frequent subsets are extended one item at a time (a step known as candidate generation), and groups of candidates are tested against the data. The Apriori algorithm terminates when no further successful extensions are found.

Advantages/Disadvantages of Apriori Algorithm In Data Mining:

Advantages:

Uses large itemset property
Easily parallelized
Easy to implement

Disadvantages:

Assumes transaction database is memory resident.
Requires many database scans

Apriori Helps in mining the frequent itemset.

Example 1:

Minimum Support: 2

Apriori Algorithm in data mining

Step 1: Data in the database

[quads id=1]

Step 2: Calculate the support/frequency of all items

Step 3: Discard the items with minimum support less than 2

Step 4: Combine two items

Step 5: Calculate the support/frequency of all items

Step 6: Discard the items with minimum support less than 2

Step 6.5: Combine three items and calculate their support.

Step 7: Discard the items with minimum support less than 2

Result:

Only one itemset is frequent (Eggs, Tea, Cold Drink) because this itemset has minimum support 2


Example 2

Minimum Support :3

Step 1: Data in the database

Step 2: Calculate the support/frequency of all items

Step 3: Discard the items with minimum support less than 3

Step 4: Combine two items

Step 5: Calculate the support/frequency of all items

Step 6: Discard the items with minimum support less than 3

Step 6.5: Combine three items and calculate their support.

Step 7: Discard the items with minimum support less than 3

Result:

There is no frequent itemset because all item sets have minimum support less than 3

Facebook Comments