Recent from talks
Nothing was collected or created yet.
Association rule learning
View on Wikipedia| Part of a series on |
| Machine learning and data mining |
|---|
Association rule learning is a rule-based machine learning method for discovering interesting relations between variables in large databases. It is intended to identify strong rules discovered in databases using some measures of interestingness.[1] In any given transaction with a variety of items, association rules are meant to discover the rules that determine how or why certain items are connected.
Based on the concept of strong rules, Rakesh Agrawal, Tomasz Imieliński and Arun Swami[2] introduced association rules for discovering regularities between products in large-scale transaction data recorded by point-of-sale (POS) systems in supermarkets. For example, the rule found in the sales data of a supermarket would indicate that if a customer buys onions and potatoes together, they are likely to also buy hamburger meat. Such information can be used as the basis for decisions about marketing activities such as, e.g., promotional pricing or product placements.
In addition to the above example from market basket analysis, association rules are employed today in many application areas including Web usage mining, intrusion detection, continuous production, and bioinformatics. In contrast with sequence mining, association rule learning typically does not consider the order of items either within a transaction or across transactions.
The association rule algorithm itself consists of various parameters that can make it difficult for those without some expertise in data mining to execute, with many rules that are arduous to understand.[3]
Definition
[edit]
Following the original definition by Agrawal, Imieliński, Swami[2] the problem of association rule mining is defined as:
Let be a set of n binary attributes called items.
Let be a set of transactions called the database.
Each transaction in D has a unique transaction ID and contains a subset of the items in I.
A rule is defined as an implication of the form:
- , where .
In Agrawal, Imieliński, Swami[2] a rule is defined only between a set and a single item, for .
Every rule is composed by two different sets of items, also known as itemsets, X and Y, where X is called antecedent or left-hand-side (LHS) and Y consequent or right-hand-side (RHS). The antecedent is that item that can be found in the data while the consequent is the item found when combined with the antecedent. The statement is often read as if X then Y, where the antecedent (X ) is the if and the consequent (Y) is the then. This simply implies that, in theory, whenever X occurs in a dataset, then Y will as well.
Process
[edit]Association rules are made by searching data for frequent if-then patterns and by using a certain criterion under Support and Confidence to define what the most important relationships are. Support is the evidence of how frequent an item appears in the data given, as Confidence is defined by how many times the if-then statements are found true. However, there is a third criteria that can be used, it is called Lift and it can be used to compare the expected Confidence and the actual Confidence. Lift will show how many times the if-then statement is expected to be found to be true.
Association rules are made to calculate from itemsets, which are created by two or more items. If the rules were built from the analyzing from all the possible itemsets from the data then there would be so many rules that they wouldn’t have any meaning. That is why Association rules are typically made from rules that are well represented by the data.
There are many different data mining techniques you could use to find certain analytics and results, for example, there is Classification analysis, Clustering analysis, and Regression analysis.[4] What technique you should use depends on what you are looking for with your data. Association rules are primarily used to find analytics and a prediction of customer behavior. For Classification analysis, it would most likely be used to question, make decisions, and predict behavior.[5] Clustering analysis is primarily used when there are no assumptions made about the likely relationships within the data.[5] Regression analysis Is used when you want to predict the value of a continuous dependent from a number of independent variables.[5]
Benefits
There are many benefits of using Association rules like finding the pattern that helps understand the correlations and co-occurrences between data sets. A very good real-world example that uses Association rules would be medicine. Medicine uses Association rules to help diagnose patients. When diagnosing patients there are many variables to consider as many diseases will share similar symptoms. With the use of the Association rules, doctors can determine the conditional probability of an illness by comparing symptom relationships from past cases.[6]
Downsides
However, Association rules also lead to many different downsides such as finding the appropriate parameter and threshold settings for the mining algorithm. But there is also the downside of having a large number of discovered rules. The reason is that this does not guarantee that the rules will be found relevant, but it could also cause the algorithm to have low performance. Sometimes the implemented algorithms will contain too many variables and parameters. For someone that doesn’t have a good concept of data mining, this might cause them to have trouble understanding it.[7]
Thresholds

When using Association rules, you are most likely to only use Support and Confidence. However, this means you have to satisfy a user-specified minimum support and a user-specified minimum confidence at the same time. Usually, the Association rule generation is split into two different steps that needs to be applied:
- A minimum Support threshold to find all the frequent itemsets that are in the database.
- A minimum Confidence threshold to the frequent itemsets found to create rules.
| Items | Support | Confidence | Items | Support | Confidence | |
|---|---|---|---|---|---|---|
| Item A | 30% | 50% | Item C | 45% | 55% | |
| Item B | 15% | 25% | Item A | 30% | 50% | |
| Item C | 45% | 55% | Item D | 35% | 40% | |
| Item D | 35% | 40% | Item B | 15% | 25% |
The Support Threshold is 30%, Confidence Threshold is 50%
The Table on the left is the original unorganized data and the table on the right is organized by the thresholds. In this case Item C is better than the thresholds for both Support and Confidence which is why it is first. Item A is second because its threshold values are spot on. Item D has met the threshold for Support but not Confidence. Item B has not met the threshold for either Support or Confidence and that is why it is last.
To find all the frequent itemsets in a database is not an easy task since it involves going through all the data to find all possible item combinations from all possible itemsets. The set of possible itemsets is the power set over I and has size , of course this means to exclude the empty set which is not considered to be a valid itemset. However, the size of the power set will grow exponentially in the number of item n that is within the power set I. An efficient search is possible by using the downward-closure property of support[2][8] (also called anti-monotonicity[9]). This would guarantee that a frequent itemset and all its subsets are also frequent and thus will have no infrequent itemsets as a subset of a frequent itemset. Exploiting this property, efficient algorithms (e.g., Apriori[10] and Eclat[11]) can find all frequent itemsets.
Useful Concepts
[edit]| transaction ID | milk | bread | butter | beer | diapers | eggs | fruit |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 |
| 2 | 0 | 0 | 1 | 0 | 0 | 1 | 1 |
| 3 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
| 4 | 1 | 1 | 1 | 0 | 0 | 1 | 1 |
| 5 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
To illustrate the concepts, we use a small example from the supermarket domain. Table 2 shows a small database containing the items where, in each entry, the value 1 means the presence of the item in the corresponding transaction, and the value 0 represents the absence of an item in that transaction. The set of items is .
An example rule for the supermarket could be meaning that if butter and bread are bought, customers also buy milk.
In order to select interesting rules from the set of all possible rules, constraints on various measures of significance and interest are used. The best-known constraints are minimum thresholds on support and confidence.
Let be itemsets, an association rule and T a set of transactions of a given database.
Note: this example is extremely small. In practical applications, a rule needs a support of several hundred transactions before it can be considered statistically significant,[citation needed] and datasets often contain thousands or millions of transactions.
Support
[edit]Support is an indication of how frequently the itemset appears in the dataset.
In our example, it can be easier to explain support by writing [12] where A and B are separate item sets that occur at the same time in a transaction.
Using Table 2 as an example, the itemset has a support of 1/5=0.2 since it occurs in 20% of all transactions (1 out of 5 transactions). The argument of support of X is a set of preconditions, and thus becomes more restrictive as it grows (instead of more inclusive).[13]
Furthermore, the itemset has a support of 1/5=0.2 as it appears in 20% of all transactions as well.
When using antecedents and consequents, it allows a data miner to determine the support of multiple items being bought together in comparison to the whole data set. For example, Table 2 shows that if milk is bought, then bread is bought has a support of 0.4 or 40%. This because in 2 out 5 of the transactions, milk as well as bread are bought. In smaller data sets like this example, it is harder to see a strong correlation when there are few samples, but when the data set grows larger, support can be used to find correlation between two or more products in the supermarket example.
Minimum support thresholds are useful for determining which itemsets are preferred or interesting.
If we set the support threshold to ≥0.4 in Table 3, then the would be removed since it did not meet the minimum threshold of 0.4. Minimum threshold is used to remove samples where there is not a strong enough support or confidence to deem the sample as important or interesting in the dataset.
Another way of finding interesting samples is to find the value of (support)×(confidence); this allows a data miner to see the samples where support and confidence are high enough to be highlighted in the dataset and prompt a closer look at the sample to find more information on the connection between the items.
Support can be beneficial for finding the connection between products in comparison to the whole dataset, whereas confidence looks at the connection between one or more items and another item. Below is a table that shows the comparison and contrast between support and support × confidence, using the information from Table 4 to derive the confidence values.
| if Antecedent then Consequent | support | support X confidence |
|---|---|---|
| if buy milk, then buy bread | 2/5= 0.4 | 0.4×1.0= 0.4 |
| if buy milk, then buy eggs | 1/5= 0.2 | 0.2×0.5= 0.1 |
| if buy bread, then buy fruit | 2/5= 0.4 | 0.4×0.66= 0.264 |
| if buy fruit, then buy eggs | 2/5= 0.4 | 0.4×0.66= 0.264 |
| if buy milk and bread, then buy fruit | 2/5= 0.4 | 0.4×1.0= 0.4 |
The support of X with respect to T is defined as the proportion of transactions in the dataset which contains the itemset X. Denoting a transaction by where i is the unique identifier of the transaction and t is its itemset, the support may be written as:
This notation can be used when defining more complicated datasets where the items and itemsets may not be as easy as our supermarket example above. Other examples of where support can be used is in finding groups of genetic mutations that work collectively to cause a disease, investigating the number of subscribers that respond to upgrade offers, and discovering which products in a drug store are never bought together.[12]
Confidence
[edit]Confidence is the percentage of all transactions satisfying X that also satisfy Y.[14]
With respect to T, the confidence value of an association rule, often denoted as , is the ratio of transactions containing both X and Y to the total amount of X values present, where X is the antecedent and Y is the consequent.
Confidence can also be interpreted as an estimate of the conditional probability , the probability of finding the RHS of the rule in transactions under the condition that these transactions also contain the LHS.[13][15]
It is commonly depicted as:
The equation illustrates that confidence can be computed by calculating the co-occurrence of transactions X and Y within the dataset in ratio to transactions containing only X. This means that the number of transactions in both X and Y is divided by those just in X .
For example, Table 2 shows the rule which has a confidence of in the dataset, which denotes that every time a customer buys butter and bread, they also buy milk. This particular example demonstrates the rule being correct 100% of the time for transactions containing both butter and bread. The rule , however, has a confidence of . This suggests that eggs are bought 67% of the times that fruit is brought. Within this particular dataset, fruit is purchased a total of 3 times, with two of those times consisting of egg purchases.
For larger datasets, a minimum threshold, or a percentage cutoff, for the confidence can be useful for determining item relationships. When applying this method to some of the data in Table 2, information that does not meet the requirements are removed. Table 4 shows association rule examples where the minimum threshold for confidence is 0.5 (50%). Any data that does not have a confidence of at least 0.5 is omitted. Generating thresholds allow for the association between items to become stronger as the data is further researched by emphasizing those that co-occur the most. The table uses the confidence information from Table 3 to implement the Support × Confidence column, where the relationship between items via their both confidence and support, instead of just one concept, is highlighted. Ranking the rules by Support × Confidence multiples the confidence of a particular rule to its support and is often implemented for a more in-depth understanding of the relationship between the items.
| if Antecedent then Consequent | Confidence | Support × Confidence |
|---|---|---|
| if buy milk, then buy bread | 2⁄2 = 1.0 | 0.4×1.0= 0.4 |
| if buy milk, then buy eggs | 1⁄2 = 0.5 | 0.2×0.5= 0.1 |
| if buy bread, then buy fruit | 2⁄3 ≈ 0.66 | 0.4×0.66= 0.264 |
| if buy fruit, then buy eggs | 2⁄3 ≈ 0.66 | 0.4×0.66= 0.264 |
| if buy milk and bread, then buy fruit | 2⁄2 = 1.0 | 0.4×1.0= 0.4 |
Overall, using confidence in association rule mining is great way to bring awareness to data relations. Its greatest benefit is highlighting the relationship between particular items to one another within the set, as it compares co-occurrences of items to the total occurrence of the antecedent in the specific rule. However, confidence is not the optimal method for every concept in association rule mining. The disadvantage of using it is that it does not offer multiple difference outlooks on the associations. Unlike support, for instance, confidence does not provide the perspective of relationships between certain items in comparison to the entire dataset, so while milk and bread, for example, may occur 100% of the time for confidence, it only has a support of 0.4 (40%). This is why it is important to look at other viewpoints, such as Support × Confidence, instead of solely relying on one concept incessantly to define the relationships.
Lift
[edit]The lift of a rule is defined as:
or the ratio of the observed support to that expected if X and Y were independent.
For example, the rule has a lift of .
If the rule had a lift of 1, it would imply that the probability of occurrence of the antecedent and that of the consequent are independent of each other. When two events are independent of each other, no rule can be drawn involving those two events.
If the lift is > 1, that lets us know the degree to which those two occurrences are dependent on one another, and makes those rules potentially useful for predicting the consequent in future data sets.
If the lift is < 1, that lets us know the items are substitute to each other. This means that presence of one item has negative effect on presence of other item and vice versa.
The value of lift is that it considers both the support of the rule and the overall data set.[13]
Conviction
[edit]The conviction of a rule is defined as .[16]
For example, the rule has a conviction of , and can be interpreted as the ratio of the expected frequency that X occurs without Y (that is to say, the frequency that the rule makes an incorrect prediction) if X and Y were independent divided by the observed frequency of incorrect predictions. In this example, the conviction value of 1.2 shows that the rule would be incorrect 20% more often (1.2 times as often) if the association between X and Y was purely random chance.
Alternative measures of interestingness
[edit]In addition to confidence, other measures of interestingness for rules have been proposed. Some popular measures are:
Several more measures are presented and compared by Tan et al.[20] and by Hahsler.[21] Looking for techniques that can model what the user has known (and using these models as interestingness measures) is currently an active research trend under the name of "Subjective Interestingness."
History
[edit]The concept of association rules was popularized particularly due to the 1993 article of Agrawal et al.,[2] which has acquired more than 23,790 citations according to Google Scholar, as of April 2021, and is thus one of the most cited papers in the Data Mining field. However, what is now called "association rules" is introduced already in the 1966 paper[22] on GUHA, a general data mining method developed by Petr Hájek et al.[23]
An early (circa 1989) use of minimum support and confidence to find all association rules is the Feature Based Modeling framework, which found all rules with and greater than user defined constraints.[24]
Statistically sound associations
[edit]One limitation of the standard approach to discovering associations is that by searching massive numbers of possible associations to look for collections of items that appear to be associated, there is a large risk of finding many spurious associations. These are collections of items that co-occur with unexpected frequency in the data, but only do so by chance. For example, suppose we are considering a collection of 10,000 items and looking for rules containing two items in the left-hand-side and 1 item in the right-hand-side. There are approximately 1,000,000,000,000 such rules. If we apply a statistical test for independence with a significance level of 0.05 it means there is only a 5% chance of accepting a rule if there is no association. If we assume there are no associations, we should nonetheless expect to find 50,000,000,000 rules. Statistically sound association discovery[25][26] controls this risk, in most cases reducing the risk of finding any spurious associations to a user-specified significance level.
Algorithms
[edit]Many algorithms for generating association rules have been proposed.
Some well-known algorithms are Apriori, Eclat algorithm and FP-Growth, but they only do half the job, since they are algorithms for mining frequent itemsets. Another step needs to be done after to generate rules from frequent itemsets found in a database.
Apriori algorithm
[edit]Apriori is given by R. Agrawal and R. Srikant in 1994 for frequent item set mining and association rule learning. It proceeds by identifying the frequent individual items in the database and extending them to larger and larger item sets as long as those item sets appear sufficiently often. The name of the algorithm is Apriori because it uses prior knowledge of frequent itemset properties.

Overview: 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 algorithm terminates when no further successful extensions are found. Apriori uses breadth-first search and a Hash tree structure to count candidate item sets efficiently. It generates candidate item sets of length from item sets of length . Then it prunes the candidates which have an infrequent sub pattern. According to the downward closure lemma, the candidate set contains all frequent -length item sets. After that, it scans the transaction database to determine frequent item sets among the candidates.
Example: Assume that each row is a cancer sample with a certain combination of mutations labeled by a character in the alphabet. For example a row could have {a, c} which means it is affected by mutation 'a' and mutation 'c'.
| {a, b} | {c, d} | {a, d} | {a, e} | {b, d} | {a, b, d} | {a, c, d} | {a, b, c, d} |
|---|
Now we will generate the frequent item set by counting the number of occurrences of each character. This is also known as finding the support values. Then we will prune the item set by picking a minimum support threshold. For this pass of the algorithm we will pick 3.
| a | b | c | d |
|---|---|---|---|
| 6 | 4 | 3 | 6 |
Since all support values are three or above there is no pruning. The frequent item set is {a}, {b}, {c}, and {d}. After this we will repeat the process by counting pairs of mutations in the input set.
| {a, b} | {a, c} | {a, d} | {b, c} | {b, d} | {c, d} |
|---|---|---|---|---|---|
| 3 | 2 | 4 | 1 | 3 | 3 |
Now we will make our minimum support value 4 so only {a, d} will remain after pruning. Now we will use the frequent item set to make combinations of triplets. We will then repeat the process by counting occurrences of triplets of mutations in the input set.
| {a, c, d} |
|---|
| 2 |
Since we only have one item the next set of combinations of quadruplets is empty so the algorithm will stop.
Advantages and Limitations:
Apriori has some limitations. Candidate generation can result in large candidate sets. For example a 10^4 frequent 1-itemset will generate a 10^7 candidate 2-itemset. The algorithm also needs to frequently scan the database, to be specific n+1 scans where n is the length of the longest pattern. Apriori is slower than the Eclat algorithm. However, Apriori performs well compared to Eclat when the dataset is large. This is because in the Eclat algorithm if the dataset is too large the tid-lists become too large for memory. FP-growth outperforms the Apriori and Eclat. This is due to the FP-growth algorithm not having candidate generation or test, using a compact data structure, and only having one database scan.[27]
Eclat algorithm
[edit]Eclat[11] (alt. ECLAT, stands for Equivalence Class Transformation) is a backtracking algorithm, which traverses the frequent itemset lattice graph in a depth-first search (DFS) fashion. Whereas the breadth-first search (BFS) traversal used in the Apriori algorithm will end up checking every subset of an itemset before checking it, DFS traversal checks larger itemsets and can save on checking the support of some of its subsets by virtue of the downward-closer property. Furthermore it will almost certainly use less memory as DFS has a lower space complexity than BFS.
To illustrate this, let there be a frequent itemset {a, b, c}. a DFS may check the nodes in the frequent itemset lattice in the following order: {a} → {a, b} → {a, b, c}, at which point it is known that {b}, {c}, {a, c}, {b, c} all satisfy the support constraint by the downward-closure property. BFS would explore each subset of {a, b, c} before finally checking it. As the size of an itemset increases, the number of its subsets undergoes combinatorial explosion.
It is suitable for both sequential as well as parallel execution with locality-enhancing properties.[28][29]
FP-growth algorithm
[edit]FP stands for frequent pattern.[30]
In the first pass, the algorithm counts the occurrences of items (attribute-value pairs) in the dataset of transactions, and stores these counts in a 'header table'. In the second pass, it builds the FP-tree structure by inserting transactions into a trie.
Items in each transaction have to be sorted by descending order of their frequency in the dataset before being inserted so that the tree can be processed quickly. Items in each transaction that do not meet the minimum support requirement are discarded. If many transactions share most frequent items, the FP-tree provides high compression close to tree root.
Recursive processing of this compressed version of the main dataset grows frequent item sets directly, instead of generating candidate items and testing them against the entire database (as in the apriori algorithm).
Growth begins from the bottom of the header table i.e. the item with the smallest support by finding all sorted transactions that end in that item. Call this item .
A new conditional tree is created which is the original FP-tree projected onto . The supports of all nodes in the projected tree are re-counted with each node getting the sum of its children counts. Nodes (and hence subtrees) that do not meet the minimum support are pruned. Recursive growth ends when no individual items conditional on meet the minimum support threshold. The resulting paths from root to will be frequent itemsets. After this step, processing continues with the next least-supported header item of the original FP-tree.
Once the recursive process has completed, all frequent item sets will have been found, and association rule creation begins.[31]
Others
[edit]ASSOC
[edit]The ASSOC procedure[32] is a GUHA method which mines for generalized association rules using fast bitstrings operations. The association rules mined by this method are more general than those output by apriori, for example "items" can be connected both with conjunction and disjunctions and the relation between antecedent and consequent of the rule is not restricted to setting minimum support and confidence as in apriori: an arbitrary combination of supported interest measures can be used.
OPUS search
[edit]OPUS is an efficient algorithm for rule discovery that, in contrast to most alternatives, does not require either monotone or anti-monotone constraints such as minimum support.[33] Initially used to find rules for a fixed consequent[33][34] it has subsequently been extended to find rules with any item as a consequent.[35] OPUS search is the core technology in the popular Magnum Opus association discovery system.
Lore
[edit]A famous story about association rule mining is the "beer and diaper" story. A purported survey of behavior of supermarket shoppers discovered that customers (presumably young men) who buy diapers tend also to buy beer. This anecdote became popular as an example of how unexpected association rules might be found from everyday data. There are varying opinions as to how much of the story is true.[36] Daniel Powers says:[36]
In 1992, Thomas Blischok, manager of a retail consulting group at Teradata, and his staff prepared an analysis of 1.2 million market baskets from about 25 Osco Drug stores. Database queries were developed to identify affinities. The analysis "did discover that between 5:00 and 7:00 p.m. that consumers bought beer and diapers". Osco managers did NOT exploit the beer and diapers relationship by moving the products closer together on the shelves.
Other types of association rule mining
[edit]Multi-Relation Association Rules (MRAR): These are association rules where each item may have several relations. These relations indicate indirect relationships between the entities. Consider the following MRAR where the first item consists of three relations live in, nearby and humid: “Those who live in a place which is nearby a city with humid climate type and also are younger than 20 their health condition is good”. Such association rules can be extracted from RDBMS data or semantic web data.[37]
Contrast set learning is a form of associative learning. Contrast set learners use rules that differ meaningfully in their distribution across subsets.[38][39]
Weighted class learning is another form of associative learning where weights may be assigned to classes to give focus to a particular issue of concern for the consumer of the data mining results.
High-order pattern discovery facilitates the capture of high-order (polythetic) patterns or event associations that are intrinsic to complex real-world data. [40]
K-optimal pattern discovery provides an alternative to the standard approach to association rule learning which requires that each pattern appear frequently in the data.
Approximate Frequent Itemset mining is a relaxed version of Frequent Itemset mining that allows some of the items in some of the rows to be 0.[41]
Generalized Association Rules hierarchical taxonomy (concept hierarchy)
Quantitative Association Rules categorical and quantitative data
Interval Data Association Rules e.g. partition the age into 5-year-increment ranged
Sequential pattern mining discovers subsequences that are common to more than minsup (minimum support threshold) sequences in a sequence database, where minsup is set by the user. A sequence is an ordered list of transactions.[42]
Subspace Clustering, a specific type of clustering high-dimensional data, is in many variants also based on the downward-closure property for specific clustering models.[43]
Warmr, shipped as part of the ACE data mining suite, allows association rule learning for first order relational rules.[44]
See also
[edit]References
[edit]- ^ Piatetsky-Shapiro, Gregory (1991), Discovery, analysis, and presentation of strong rules, in Piatetsky-Shapiro, Gregory; and Frawley, William J.; eds., Knowledge Discovery in Databases, AAAI/MIT Press, Cambridge, MA.
- ^ a b c d e f Agrawal, R.; Imieliński, T.; Swami, A. (1993). "Mining association rules between sets of items in large databases". Proceedings of the 1993 ACM SIGMOD international conference on Management of data - SIGMOD '93. p. 207. CiteSeerX 10.1.1.40.6984. doi:10.1145/170035.170072. ISBN 978-0897915922. S2CID 490415.
- ^ Garcia, Enrique (2007). "Drawbacks and solutions of applying association rule mining in learning management systems" (PDF). Sci2s. Archived (PDF) from the original on 2009-12-23.
- ^ "Data Mining Techniques: Top 5 to Consider". Precisely. 2021-11-08. Retrieved 2021-12-10.
- ^ a b c "16 Data Mining Techniques: The Complete List - Talend". Talend - A Leader in Data Integration & Data Integrity. Retrieved 2021-12-10.
- ^ "What are Association Rules in Data Mining (Association Rule Mining)?". SearchBusinessAnalytics. Retrieved 2021-12-10.
- ^ "Drawbacks and solutions of applying association rule mining in learning management systems". ResearchGate. Retrieved 2021-12-10.
- ^ Tan, Pang-Ning; Michael, Steinbach; Kumar, Vipin (2005). "Chapter 6. Association Analysis: Basic Concepts and Algorithms" (PDF). Introduction to Data Mining. Addison-Wesley. ISBN 978-0-321-32136-7.
- ^ Jian Pei; Jiawei Han; Lakshmanan, L.V.S. (2001). "Mining frequent itemsets with convertible constraints". Proceedings 17th International Conference on Data Engineering. pp. 433–442. CiteSeerX 10.1.1.205.2150. doi:10.1109/ICDE.2001.914856. ISBN 978-0-7695-1001-9. S2CID 1080975.
- ^ Agrawal, Rakesh; and Srikant, Ramakrishnan; Fast algorithms for mining association rules in large databases Archived 2015-02-25 at the Wayback Machine, in Bocca, Jorge B.; Jarke, Matthias; and Zaniolo, Carlo; editors, Proceedings of the 20th International Conference on Very Large Data Bases (VLDB), Santiago, Chile, September 1994, pages 487-499
- ^ a b Zaki, M. J. (2000). "Scalable algorithms for association mining". IEEE Transactions on Knowledge and Data Engineering. 12 (3): 372–390. Bibcode:2000ITKDE..12..372Z. CiteSeerX 10.1.1.79.9448. doi:10.1109/69.846291.
- ^ a b Han, Jiawei; Kamber, Micheline; Pei, Jian (2012). Mining Frequent Patterns, Associations, and Correlations: Basic Concepts and Methods. doi:10.1016/B978-0-12-381479-1.00006-X. ISBN 9780123814791.
- ^ a b c Hahsler, Michael (2005). "Introduction to arules – A computational environment for mining association rules and frequent item sets" (PDF). Journal of Statistical Software. doi:10.18637/jss.v014.i15. Archived from the original (PDF) on 2019-04-30. Retrieved 2016-03-18.
- ^ Wong, Pak (1999). "Visualizing Association Rules for Text Mining" (PDF). BSTU Laboratory of Artificial Neural Networks. Archived (PDF) from the original on 2021-11-29.
- ^ Hipp, J.; Güntzer, U.; Nakhaeizadeh, G. (2000). "Algorithms for association rule mining --- a general survey and comparison". ACM SIGKDD Explorations Newsletter. 2: 58–64. CiteSeerX 10.1.1.38.5305. doi:10.1145/360402.360421. S2CID 9248096.
- ^ Brin, Sergey; Motwani, Rajeev; Ullman, Jeffrey D.; Tsur, Shalom (1997). "Dynamic itemset counting and implication rules for market basket data". Proceedings of the 1997 ACM SIGMOD international conference on Management of data - SIGMOD '97. pp. 255–264. CiteSeerX 10.1.1.41.6476. doi:10.1145/253260.253325. ISBN 978-0897919111. S2CID 15385590.
- ^ Omiecinski, E.R. (2003). "Alternative interest measures for mining associations in databases". IEEE Transactions on Knowledge and Data Engineering. 15 (1): 57–69. Bibcode:2003IDSO...15E1582O. CiteSeerX 10.1.1.329.5344. doi:10.1109/TKDE.2003.1161582. S2CID 18364249.
- ^ Aggarwal, Charu C.; Yu, Philip S. (1998). "A new framework for itemset generation". Proceedings of the seventeenth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems - PODS '98. pp. 18–24. CiteSeerX 10.1.1.24.714. doi:10.1145/275487.275490. ISBN 978-0897919968. S2CID 11934586.
- ^ Piatetsky-Shapiro, Gregory; Discovery, analysis, and presentation of strong rules, Knowledge Discovery in Databases, 1991, pp. 229-248
- ^ Tan, Pang-Ning; Kumar, Vipin; Srivastava, Jaideep (2004). "Selecting the right objective measure for association analysis". Information Systems. 29 (4): 293–313. CiteSeerX 10.1.1.331.4740. doi:10.1016/S0306-4379(03)00072-3.
- ^ Michael Hahsler (2015). A Probabilistic Comparison of Commonly Used Interest Measures for Association Rules. https://mhahsler.github.io/arules/docs/measures
- ^ Hájek, P.; Havel, I.; Chytil, M. (1966). "The GUHA method of automatic hypotheses determination". Computing. 1 (4): 293–308. doi:10.1007/BF02345483. S2CID 10511114.
- ^ Hájek, Petr; Rauch, Jan; Coufal, David; Feglar, Tomáš (2004). "The GUHA Method, Data Preprocessing and Mining". Database Support for Data Mining Applications. Lecture Notes in Computer Science. Vol. 2682. pp. 135–153. doi:10.1007/978-3-540-44497-8_7. ISBN 978-3-540-22479-2.
- ^ Webb, Geoffrey (1989). "A Machine Learning Approach to Student Modelling". Proceedings of the Third Australian Joint Conference on Artificial Intelligence (AI 89): 195–205.
- ^ Webb, Geoffrey I. (2007). "Discovering Significant Patterns". Machine Learning. 68: 1–33. doi:10.1007/s10994-007-5006-x.
- ^ Gionis, Aristides; Mannila, Heikki; Mielikäinen, Taneli; Tsaparas, Panayiotis (2007). "Assessing data mining results via swap randomization". ACM Transactions on Knowledge Discovery from Data. 1 (3): 14–es. CiteSeerX 10.1.1.141.2607. doi:10.1145/1297332.1297338. S2CID 52305658.
- ^ Heaton, Jeff (2017-01-30). "Comparing Dataset Characteristics that Favor the Apriori, Eclat or FP-Growth Frequent Itemset Mining Algorithms". arXiv:1701.09042 [cs.DB].
- ^ Zaki, Mohammed Javeed; Parthasarathy, Srinivasan; Ogihara, Mitsunori; Li, Wei (1997). New Algorithms for Fast Discovery of Association Rules (Report). pp. 283–286. CiteSeerX 10.1.1.42.3283. hdl:1802/501.
- ^ Zaki, Mohammed J.; Parthasarathy, Srinivasan; Ogihara, Mitsunori; Li, Wei (1997). "Parallel Algorithms for Discovery of Association Rules". Data Mining and Knowledge Discovery. 1 (4): 343–373. doi:10.1023/A:1009773317876. S2CID 10038675.
- ^ Han (2000). "Mining frequent patterns without candidate generation". Proceedings of the 2000 ACM SIGMOD international conference on Management of data. Vol. SIGMOD '00. pp. 1–12. CiteSeerX 10.1.1.40.4436. doi:10.1145/342009.335372. ISBN 978-1581132175. S2CID 6059661.
- ^ Witten, Frank, Hall: Data mining practical machine learning tools and techniques, 3rd edition[page needed]
- ^ Hájek, Petr; Havránek, Tomáš (1978). Mechanizing Hypothesis Formation: Mathematical Foundations for a General Theory. Springer-Verlag. ISBN 978-3-540-08738-0.
- ^ a b Webb, Geoffrey I. (1995); OPUS: An Efficient Admissible Algorithm for Unordered Search, Journal of Artificial Intelligence Research 3, Menlo Park, CA: AAAI Press, pp. 431-465 online access
- ^ Bayardo, Roberto J. Jr.; Agrawal, Rakesh; Gunopulos, Dimitrios (2000). "Constraint-based rule mining in large, dense databases". Data Mining and Knowledge Discovery. 4 (2): 217–240. doi:10.1023/A:1009895914772. S2CID 5120441.
- ^ Webb, Geoffrey I. (2000). "Efficient search for association rules". Proceedings of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining - KDD '00. pp. 99–107. CiteSeerX 10.1.1.33.1309. doi:10.1145/347090.347112. ISBN 978-1581132335. S2CID 5444097.
- ^ a b "DSS News: Vol. 3, No. 23".
- ^ Ramezani, Reza, Mohamad Saraee, and Mohammad Ali Nematbakhsh; MRAR: Mining Multi-Relation Association Rules, Journal of Computing and Security, 1, no. 2 (2014)
- ^ GI Webb and S. Butler and D. Newlands (2003). On Detecting Differences Between Groups. KDD'03 Proceedings of the Ninth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.
- ^ Menzies, T.; Ying Hu (2003). "Computing practices - Data mining for very busy people". Computer. 36 (11): 22–29. doi:10.1109/MC.2003.1244531.
- ^ Wong, A.K.C.; Yang Wang (1997). "High-order pattern discovery from discrete-valued data". IEEE Transactions on Knowledge and Data Engineering. 9 (6): 877–893. CiteSeerX 10.1.1.189.1704. doi:10.1109/69.649314.
- ^ Liu, Jinze; Paulsen, Susan; Sun, Xing; Wang, Wei; Nobel, Andrew; Prins, Jan (2006). "Mining Approximate Frequent Itemsets in the Presence of Noise: Algorithm and Analysis". Proceedings of the 2006 SIAM International Conference on Data Mining. pp. 407–418. CiteSeerX 10.1.1.215.3599. doi:10.1137/1.9781611972764.36. ISBN 978-0-89871-611-5.
- ^ Zaki, Mohammed J. (2001); SPADE: An Efficient Algorithm for Mining Frequent Sequences, Machine Learning Journal, 42, pp. 31–60
- ^ Zimek, Arthur; Assent, Ira; Vreeken, Jilles (2014). Frequent Pattern Mining. pp. 403–423. doi:10.1007/978-3-319-07821-2_16. ISBN 978-3-319-07820-5.
- ^ King, R. D.; Srinivasan, A.; Dehaspe, L. (Feb 2001). "Warmr: a data mining tool for chemical data". J Comput Aided Mol Des. 15 (2): 173–81. Bibcode:2001JCAMD..15..173K. doi:10.1023/A:1008171016861. PMID 11272703. S2CID 3055046.
Bibliographies
[edit]- Annotated Bibliography on Association Rules Archived 2017-02-19 at the Wayback Machine by M. Hahsler
Association rule learning
View on GrokipediaFundamentals
Definition
Association rule learning is a data mining technique used to uncover relationships between variables in the form of rules from large transactional databases, particularly for identifying patterns of co-occurrence among items. Introduced in the context of analyzing sales transactions, it addresses the challenge of discovering frequent patterns in datasets where items appear together more often than expected by chance, enabling insights such as customer purchasing behaviors.[4] This method is particularly prominent in market basket analysis, where it helps retailers understand which products are commonly bought together to inform inventory management and promotional strategies.[1] Formally, an association rule is defined as an implication of the form , where and are disjoint subsets (itemsets) of a larger set of items , representing that the presence of items in suggests the presence of items in .[4] The underlying data structure is a transactional database , consisting of a set of transactions, each represented as a unique identifier (TID) associated with a set of items such that the itemset is a subset of . A transaction is said to contain an itemset if all items in that itemset are present in the transaction. This setup allows for the systematic identification of rules that capture conditional dependencies without requiring labeled data, distinguishing it from supervised tasks like classification or prediction, as it focuses solely on unsupervised discovery of item co-occurrences in unlabeled datasets.[4][5] To illustrate, consider a simple grocery store transactional database used in market basket analysis, where each row represents a customer's purchase basket:| TID | Items |
|---|---|
| 1 | {Bread, Milk} |
| 2 | {Bread, Diapers, Beer, Eggs} |
| 3 | {Milk, Diapers, Beer, Cola} |
| 4 | {Bread, Milk, Diapers, Beer} |
| 5 | {Bread, Milk, Diapers, Cola} |
Applications
Association rule learning has been extensively applied across diverse domains to uncover hidden relationships in transactional and categorical data, driving practical decision-making and optimization. In retail, it powers market basket analysis, a foundational use case where patterns in customer purchases inform inventory management, shelf arrangement, and promotional strategies. The technique identifies co-occurring items in shopping baskets, enabling retailers to predict complementary sales and enhance revenue; for instance, early applications in supermarket data mining revealed frequent pairings that guided cross-promotions, as demonstrated in the development of the Apriori algorithm for transactional databases. This approach has been widely adopted since the 1990s, with algorithms like Apriori processing large-scale point-of-sale records to generate actionable rules for product bundling. In healthcare, association rule learning analyzes electronic health records to detect drug interactions and symptom co-occurrences, supporting clinical decision-making and patient safety. By mining prescription and adverse event data, it identifies high-risk medication combinations; one study applied association rule mining to a large clinical dataset, automatically inferring links between drugs and problems like adverse reactions, achieving high precision in validation against known interactions.[6] Similarly, it reveals patterns in disease symptoms, such as co-occurring indicators in COVID-19 cases, where Apriori-based mining extracted frequent symptom clusters from patient reports, aiding in diagnostic protocol refinement and resource allocation during outbreaks.[7] Web usage mining leverages association rules for personalized recommendations in e-commerce, analyzing user navigation and transaction logs to suggest relevant content or products. This enhances user engagement by predicting next actions based on historical patterns; a procedure for mining rules from customer-product databases supports on-line recommendations, improving conversion rates in dynamic shopping environments.[8] Platforms like Amazon employ similar item-association techniques in their collaborative filtering systems to recommend products based on co-purchase behaviors, scaling to millions of daily interactions for targeted suggestions.[9] In bioinformatics, association rule learning facilitates the discovery of biological relationships, such as gene co-expressions and protein interactions, from high-dimensional datasets like microarray or interaction networks. It mines patterns in gene expression levels to link regulatory dependencies with phenotypic outcomes; dynamic association rules applied to time-series expression data uncovered evolving co-regulation patterns, providing insights into disease mechanisms.[10] For protein interactions, rule-based methods predict functional associations using site motifs, with one approach classifying interaction types from sequence data to support proteome-wide predictions.[11] Emerging applications extend to fraud detection in finance and cybersecurity, where association rules identify anomalous patterns in real-time streaming data. In financial transactions, they spot irregular co-occurrences indicative of fraud, such as unusual payment sequences; post-2020 studies integrated rule mining with sequential analysis for credit card fraud detection, improving identification of evolving scam tactics in payment networks.[12] In cybersecurity, mining rules from multi-source logs detects intrusions by highlighting deviant event associations, enabling proactive threat mitigation in cloud environments.[13] These uses, often combined with streaming adaptations of algorithms like Apriori, address the challenges of high-velocity data in modern systems.Interestingness Measures
Support and Confidence
In association rule learning, support and confidence serve as core metrics for assessing the prevalence and dependability of rules extracted from transactional data. These measures were introduced in the foundational work on mining association rules from large databases, where they enable the identification of patterns that meet user-specified criteria for significance.[4] The support of an association rule , denoted , quantifies the frequency with which the itemset appears across all transactions in the database . It is formally defined as This proportion represents the absolute support of the itemset relative to the total number of transactions, providing an indication of the rule's overall occurrence in the dataset. Higher support values suggest greater commonality of the pattern.[4] Confidence, denoted , evaluates the rule's reliability by measuring the likelihood that occurs given that is present in a transaction. It is calculated as the ratio of the support of the full itemset to the support of the antecedent: This metric corresponds to the conditional probability , reflecting how often the consequent follows the antecedent among relevant transactions. Values closer to 1 indicate stronger predictive strength.[4] To ensure only meaningful rules are generated, thresholds such as minimum support (minsup) and minimum confidence (minconf) are set by users. A rule is deemed valid if and , filtering out infrequent or unreliable patterns while balancing computational efficiency and result relevance.[4] Consider a sample transaction database representing grocery purchases, consisting of five transactions:| TID | Items |
|---|---|
| 1 | bread, butter |
| 2 | bread, milk |
| 3 | butter, milk |
| 4 | bread, butter, milk |
| 5 | bread |
- , since two transactions (TID 1 and 4) contain both items.
- , as bread appears in four transactions.
- , meaning butter accompanies bread in 50% of cases where bread is purchased.
Lift and Conviction
Lift and conviction are two key interestingness measures used to evaluate the dependence between the antecedent and consequent in association rules, building on support and confidence as foundational metrics. The lift measure quantifies how much more frequently the antecedent and consequent occur together compared to if they were independent. Its formula is given by [14] A lift value greater than 1 indicates positive dependence (the rule is more useful than random), equal to 1 suggests independence, and less than 1 implies negative dependence.[14] This measure helps filter out rules that merely reflect overall data frequencies rather than true patterns.[14] Conviction assesses the robustness of a rule by measuring the ratio of the expected frequency of the consequent's absence to its observed frequency when the antecedent is present, highlighting the implications of rule errors. The formula is [14] Higher conviction values indicate stronger implications, with values approaching infinity for perfect rules (where confidence is 1, making the denominator zero) and 1 signifying independence between the rule and the consequent's negation.[14] Unlike symmetric measures, conviction is directed and emphasizes the reliability of the implication.[14] To illustrate, consider a transaction dataset with 1,000 records where supp({bread}) = 0.10, supp({butter}) = 0.05, and supp({bread, butter}) = 0.04 for the rule {bread} → {butter}. The confidence is 0.04 / 0.10 = 0.40, yielding lift = 0.40 / 0.05 = 8 (strong positive dependence). Conviction = (1 - 0.05) / (1 - 0.40) ≈ 1.58 (moderate implication strength). In contrast, if supp({bread, butter}) = 0.005 (matching independence), confidence = 0.05, lift = 1, and conviction = 1, confirming no dependence. These calculations demonstrate lift's role in detecting unexpected co-occurrences and conviction's focus on error implications. Lift is particularly useful in dense datasets to avoid spurious rules by prioritizing those with values substantially above 1, reducing the volume of generated rules in market basket analysis.[14] Conviction aids in evaluating rule robustness, favoring implications less sensitive to false positives, which is valuable for predictive applications where rule failure costs are asymmetric.[14]Alternative Measures
In addition to core dependence measures like lift, several alternative interestingness metrics address specific limitations, such as sensitivity to independence assumptions or the need for normalization in sparse datasets.[15] These metrics provide nuanced evaluations of rule strength, particularly when standard measures overemphasize frequency or fail to capture set overlaps effectively. Leverage quantifies the difference between the observed support of a rule and the support expected under independence, highlighting deviations from random co-occurrence. Formally, for a rule , where denotes probability (support divided by total transactions).[15] This measure ranges from -1 to 1, with positive values indicating positive dependence and zero signifying independence; it is particularly useful for identifying rules where items co-occur more frequently than chance would predict, though it can be affected by rare items. Introduced by Piatetsky-Shapiro in 1991, leverage serves as a foundational deviation-based metric in rule evaluation. The Jaccard index evaluates the similarity between the antecedent and consequent sets by focusing on their intersection relative to the union, making it suitable for assessing overlapping patterns in transactional data. It is defined as with a range of [0, 1], where higher values denote greater overlap.[15] Null-invariant and normalized, Jaccard is preferred for sparse datasets, as it ignores co-absences and emphasizes true co-presences, avoiding biases in high-dimensional spaces where many items rarely appear together. Other notable metrics include the Kulczynski measure, which averages conditional probabilities to favor skewed implications; the imbalance ratio, which penalizes asymmetric rule directions; and cosine similarity, which treats rules as vectors for correlation assessment. The Kulczynski measure is given by ranging from 0 to 1 and neutral at 0.5, making it ideal for datasets with imbalanced item frequencies where balanced rules are less informative. The imbalance ratio complements it by quantifying directional bias: with values near 0 for balanced rules and approaching 1 for highly skewed ones; it is applied when domain knowledge prioritizes one-sided implications, such as in market basket analysis. Cosine similarity, defined as ranges from 0 to 1 and is used for high-dimensional data to measure angular similarity, performing well in vector-like representations of itemsets. These were formalized in Wu et al.'s 2010 framework, which unified their properties for pattern mining. Selecting an appropriate measure depends on dataset characteristics and domain requirements; for instance, sparse or high-dimensional data—common in genomics or e-commerce—benefits from normalized, null-invariant metrics like Jaccard or cosine to mitigate biases from low support and ensure comparability across rules. In contrast, domains with dense, balanced distributions may favor deviation-based measures like leverage for raw independence testing, while multicriteria approaches, such as those using PROMETHEE ranking, allow tailoring to properties like asymmetry or threshold ease.[16] Tan et al. (2002) emphasize that support thresholds between 0.5% and 30% in high-dimensional settings preserve measure correlations, guiding selection for scalable mining. Recent developments in the 2010s introduced entropy-based measures to handle big data complexities, such as uncertainty in large-scale patterns, by incorporating information gain or conditional entropy to prioritize rules reducing predictive ambiguity.[17] For example, Liu and Li (2015) proposed an entropy-derived metric that weights rules by the information entropy of their consequents, enhancing interestingness in noisy, voluminous datasets where traditional measures overlook distributional variance.[17] These additions are particularly impactful for big data applications, as validated in spatial and gene expression mining contexts.[18]Mining Process
Frequent Itemset Generation
Frequent itemsets are subsets of items that appear together in a transactional database with a frequency exceeding a user-specified minimum support threshold, known as minsup.[4] The support of an itemset is defined as the proportion of transactions in the database that contain the itemset, serving as the measure for this frequency threshold.[19] Identifying these frequent itemsets forms the foundational step in association rule mining, as they represent the recurring patterns necessary for deriving meaningful rules. The generation of frequent itemsets typically employs a bottom-up approach that traverses the itemset lattice, a conceptual structure representing all possible item combinations ordered by subset relationships.[19] This lattice, often visualized as a Hasse diagram, allows for systematic enumeration starting from single items (1-itemsets) and progressively building larger combinations (k-itemsets). Candidate itemsets are generated level by level, with their supports counted against the database to determine frequency. A key optimization relies on the anti-monotone property, also known as the Apriori property: if an itemset is infrequent (support below minsup), then all its supersets are also infrequent, enabling early pruning of the search space to avoid exploring unpromising branches.[4] To illustrate, consider a small transactional database with minsup set to 2 transactions. The database consists of the following transactions:| TID | Items |
|---|---|
| 100 | {1, 3, 4} |
| 200 | {2, 3, 5} |
| 300 | {1, 2, 3, 5} |
| 400 | {2, 5} |
Association Rule Derivation
Once frequent itemsets have been identified, association rules are derived by systematically partitioning each itemset into antecedent (X) and consequent (Y) subsets, where X and Y are non-empty, disjoint, and their union equals the itemset.[20] For a given frequent itemset, all possible such partitions are considered, and the confidence of each potential rule X → Y is computed as the ratio of the support of the full itemset to the support of X; rules meeting or exceeding a user-specified minimum confidence threshold (minconf) are retained.[20] This process ensures that only rules indicating a strong implication between itemsets are generated.[20] The computational complexity of rule derivation arises from the exponential number of possible partitions for an itemset of size k, which is 2^k - 2 (excluding the empty set and the full itemset itself).[4] However, this is mitigated by the fact that only frequent itemsets—those already pruned during the prior generation phase based on minimum support—are processed, significantly reducing the search space.[4] Additionally, confidence calculations often eliminate many candidate rules early, as low-confidence partitions are discarded without further exploration.[20] Consider a frequent itemset {A, B, C} with support 0.3 in a database of 100 transactions (appearing in 30 transactions). Possible rules include {A, B} → {C}, where confidence is calculated as the support of {A, B, C} divided by the support of {A, B} (e.g., if support of {A, B} is 0.4, confidence is 0.3 / 0.4 = 0.75 or 75%); this rule would be retained if minconf is 70%.[20] Similarly, {A} → {B, C} might yield a confidence of 0.3 / 0.5 = 0.6 (60%), potentially discarded if below threshold. Post-processing involves rule reduction to achieve a minimal description, primarily by eliminating redundant rules—those subsumed by more general rules with equal or higher confidence (e.g., removing {A, B} → C if {A} → {B, C} has the same confidence).[21] This step prunes the rule set while preserving informational completeness, often resulting in significant reductions without losing key implications.[21]Algorithms
Apriori Algorithm
The Apriori algorithm is a classic breadth-first search method for discovering frequent itemsets in transactional databases, serving as the foundation for generating association rules by leveraging the Apriori property: any subset of a frequent itemset must also be frequent. This property enables efficient pruning of candidate itemsets during the mining process. Introduced by Rakesh Agrawal and Ramakrishnan Srikant in 1994, the algorithm addresses the challenge of mining large-scale transaction data, such as retail purchase records, by iteratively building larger itemsets from smaller frequent ones.[4] The algorithm proceeds in passes over the database. In the first pass, it generates all 1-itemsets (single items) and scans the database to compute their support, retaining only those meeting or exceeding the minimum support threshold as the set of frequent 1-itemsets, denoted L₁. For each subsequent pass k ≥ 2, it uses the frequent (k-1)-itemsets from the previous pass (L_{k-1}) to generate candidate k-itemsets (C_k) through a self-join operation, where two (k-1)-itemsets are joined if their first (k-2) items match and the (k-1)th items differ. It then applies pruning: any candidate in C_k whose any (k-1)-subset is not in L_{k-1} is discarded, as it cannot be frequent per the Apriori property. The database is scanned again to count the support of the pruned C_k, and those with support ≥ minimum support form L_k. The process repeats, incrementing k, until L_k is empty. The union of all L_k yields the complete set of frequent itemsets.[4] Pseudocode for the core Apriori algorithm is as follows:L₁ = {frequent 1-itemsets};
for (k = 2; L_{k-1} ≠ ∅; k++) do begin
C_k = apriori-gen(L_{k-1}); // Generate candidates from L_{k-1}
for all transactions t ∈ D do begin
C_t = subset(C_k, t); // Find candidates subset of t
for all candidates c ∈ C_t do
c.count++;
end
L_k = {c ∈ C_k | c.count ≥ minsup};
end
Answer = ∪_k L_k;
L₁ = {frequent 1-itemsets};
for (k = 2; L_{k-1} ≠ ∅; k++) do begin
C_k = apriori-gen(L_{k-1}); // Generate candidates from L_{k-1}
for all transactions t ∈ D do begin
C_t = subset(C_k, t); // Find candidates subset of t
for all candidates c ∈ C_t do
c.count++;
end
L_k = {c ∈ C_k | c.count ≥ minsup};
end
Answer = ∪_k L_k;
| TID | Items |
|---|---|
| 001 | I1, I2, I5 |
| 002 | I2, I4 |
| 003 | I2, I3 |
| 004 | I1, I2, I4 |
| 005 | I1, I3 |
| 006 | I2, I3 |
| 007 | I1, I3 |
| 008 | I1, I2, I3, I5 |
| 009 | I1, I2, I3 |
Eclat Algorithm
The Eclat (Equivalence Class Clustering and bottom-up Lattice Traversal) algorithm, introduced by Mohammed J. Zaki in 2000, mines frequent itemsets for association rule learning by employing a vertical database representation rather than the traditional horizontal format. In this approach, the database is transformed into tid-lists, where each item is associated with a list of transaction IDs (tids) in which it appears; the support of an itemset is then determined by the size of the intersection of the tid-lists of its constituent items. This vertical format facilitates rapid support calculations through set intersections, making it particularly suitable for datasets where items have varying occurrence patterns.[23] The algorithm begins by scanning the database once to construct the tid-lists for all items and identifying frequent 1-itemsets based on the minimum support threshold. To generate higher-order frequent itemsets, it intersects the tid-lists of frequent k-itemsets to form candidate (k+1)-itemsets, pruning any with intersection sizes below the minimum support. This process relies on the anti-monotone property, where infrequent extensions of frequent itemsets can be discarded early.[23] Eclat incorporates a depth-first search strategy integrated with prefix-span techniques to traverse the itemset lattice efficiently; it partitions the search space into equivalence classes defined by item prefixes, enabling systematic exploration from smaller to larger itemsets within each class. This bottom-up, depth-first enumeration avoids generating unnecessary candidates by focusing on promising prefixes.[23] In terms of complexity, Eclat exhibits a worst-case time complexity of , where is the number of transactions and is the number of distinct items, reflecting the potential exponential growth in the itemset space. However, its practical efficiency stems from optimized intersections—often using sorted lists or bitwise operations on bit-vectors—making it faster than horizontal methods on sparse datasets with low support thresholds.[23] A simple example illustrates the vertical approach: consider a database with four transactions labeled T1 to T4 containing items A through E, yielding tid-lists A: {T1, T3}, B: {T2, T3, T4}, C: {T1, T2, T3}, D: {T1}, E: {T2, T3, T4}. The support for the pair {A, C} is computed as the intersection {T1, T3} ∩ {T1, T2, T3} = {T1, T3}, with size 2. Using bit-vectors (e.g., A as 1010 for T1-T4, C as 1110), a bitwise AND yields 1010, and counting the 1s confirms support of 2, highlighting the speed of such operations for frequent pair mining.[23]FP-Growth Algorithm
The FP-growth algorithm is a method for mining frequent itemsets in transactional databases without generating candidate itemsets, introduced by Han, Pei, and Yin in 2000. It employs a compact tree structure known as the frequent pattern tree (FP-tree) to store compressed information about frequent patterns, enabling efficient pattern discovery through a divide-and-conquer strategy. Unlike approaches that rely on iterative candidate pruning, FP-growth achieves completeness by recursively extracting patterns directly from the tree, making it particularly scalable for dense datasets where many items co-occur frequently.[24] The FP-tree is an extended prefix-tree structure designed to capture the essential information of frequent patterns in a database. Each path from the root to a leaf node represents a prefix of frequent patterns, with shared prefixes among transactions compressed into common branches to minimize redundancy. Every node in the tree contains three fields: the item name, a count of how many times the prefix path occurs, and a node-link pointer that connects to the next node in the FP-tree with the same item name, forming a linked list for quick traversal. A header table at the top of the tree lists all frequent items in order of decreasing support, with each entry pointing to the first node-link for that item, facilitating efficient mining. This structure is constructed to be highly compact, often fitting the entire database into memory for large-scale mining.[24] The algorithm proceeds in two main phases: building the FP-tree and mining frequent itemsets from it. In the first phase, the transactional database is scanned twice. The initial scan computes the support for each item and identifies the frequent 1-itemsets (those meeting or exceeding a minimum support threshold). These frequent items are then sorted in decreasing order of support to define a linear order for subsequent processing. The second scan processes each transaction by removing infrequent items, sorting the remaining frequent items according to the order from the first scan, and inserting the ordered transaction into the FP-tree as a path, incrementing node counts along shared prefixes and establishing node-links as needed. This construction avoids redundant storage by merging common prefixes.[24] In the mining phase, FP-growth employs a bottom-up, divide-and-conquer approach starting from the least frequent item in the header table and proceeding to more frequent ones. For each frequent item treated as a suffix pattern, the algorithm collects the conditional pattern base—a set of prefix paths associated with nodes containing that suffix item, along with their counts. From this base, a conditional FP-tree is constructed by scanning the patterns and building a new tree only with frequent items in those prefixes. Frequent itemsets are then recursively mined from this conditional tree by concatenating the suffix with patterns found in it. The process repeats for each item in the header table, accumulating all complete sets of frequent itemsets without any candidate generation or support counting against the full database. This recursive partitioning ensures all frequent patterns are discovered efficiently.[24] The time complexity for building the FP-tree is linear in the product of the database size |D| (number of transactions) and the number of distinct items |I|, denoted O(|D| × |I|), as each transaction is processed once per item. Mining from the tree is also efficient, with costs depending on the tree size and pattern density, but it scales well for both long and short frequent patterns without the overhead of candidate enumeration. Empirical studies show FP-growth outperforming candidate-based methods by an order of magnitude or more, especially on dense datasets.[24] A representative example illustrates the process using a small transactional database with a minimum support threshold of 3, as detailed in the original work. The database consists of five transactions:| TID | Original Items | Ordered Frequent Items |
|---|---|---|
| 100 | f, a, c, d, g, i, m, p | f, c, a, m, p |
| 200 | a, b, c, f, l, m, o | f, c, a, b, m |
| 300 | b, f, h, j, o | f, b |
| 400 | b, c, k, s, p | c, b, p |
| 500 | a, f, c, e, l, p, m, n | f, c, a, m, p |
