Details

The library provides Apriori algorithm for association rule mining [Agrawal94].

Let I = {i1, i2, …, im} be a set of items (products) and subset TI is a transaction associated with item set I. The association rule has the form: XY, where XI, YI, and intersection of X and Y is empty: XY=Ø. The left-hand-side set of items (itemset) X is called antecedent, while the right-hand-side itemset Y is called consequent of the rule.

Let D = {T1, T2, …, Tn} be a set of transactions, each associated with item set I. Item subset XI has support s in the transaction set D if s percent of transactions in D contains X.

The association rule XY in the transaction set D holds with confidence c if c percent of transactions in D that contain X also contains Y. Confidence of the rule can be represented as conditional probability:

confidence(XY) = support (XY)/support(X).

For a given set of transactions D = {T1, T2, …, Tn}, the minimum support s and minimum confidence c discover all item sets X with support greater than s and generate all association rules XY with confidence greater than c.

Therefore, the association rule discovery is decomposed into two stages: mining (training) and discovery (prediction). The mining stage involves generation of large item sets, that is, the sets that have support greater than the given parameters. At the discovery stage, the algorithm generates association rules using the large item sets identified at the mining stage.

For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)