Research Article

Decomposition of Data Mining Algorithms into Unified Functional Blocks

Algorithm 2

The algorithm Apriori.
(1) for each vector
(2) build the transactions list from the data set;
(3) end for each vector
(4) for each transactions
(5)    for each item set from transactions
(6)    calculate support of 1-item sets
(7)    create large 1-item sets
(8)    end for each item set from transactions
(9) end for each transactions
(10)   for each large -item set list while list ≠ ⌀
(11)  for each -item set
(12)    for each -item set starting with current
(13)   create -item set candidate
(14)   if is candidate created then
(15)   for each transactions
(16)      calculate support of candidate
(17)   end for each transactions
(18)   remove candidate with small support
(19)    end for each -item item set
(20)  end for each -item item set
(21)   end each large -item set list
(22)   for each large -item set list while list ≠ ⌀
(23)    for each large -item set from list
(24)    for each item from large -item set
(25)     create association rules
(26)    end for each item
(27)    end for each large -item set
(28)   end each large -item set list