Data Mining Assignment: Association Analysis
Data Mining Assignment: Association Analysis
The hash tree structure in the Apriori algorithm is significant for efficiently counting support by reducing the number of possible candidate itemsets that need to be checked. It organizes candidate sets in a way that allows rapid traversal and identification of itemsets present in a transaction, thus speeding up the support counting process. By visiting specific leaf nodes such as L1, L5, and L9 for transaction {1, 3, 4, 5, 8}, the algorithm efficiently isolates relevant candidates, reducing computational overhead and improving performance .
Treating Customer ID as a market basket changes the composition and total number of baskets, leading to different support calculations. For itemset {e}, the support remains the same at 0.8. However, for itemsets {b, d} and {b, d, e}, the support increases to 1.0 and 0.8 respectively, due to aggregation of transactions into customer baskets. This shows that aggregating transactions by customer increases support values, as individual customer baskets may contain more diverse combinations of items .
Aggregation of transactions by customer significantly changes support and confidence calculations because it alters the dataset's structure. This can result in increased support for certain itemsets that appear more frequently across aggregated purchases, as seen in the uniform itemsets {b, d} and {b, d, e}, whose support values jumped to 1.0 and 0.8 respectively when using customer-based baskets. Confidence values also shift similarly. These changes underscore how transaction aggregation can dramatically affect the visibility and validity of associations in market basket analysis .
The Apriori algorithm's pruning process is crucial for efficiently identifying frequent itemsets by eliminating candidates that cannot satisfy the minimum support threshold. The pruning ratio, which is 28.125% for the given dataset, reflects its effectiveness by showing the percentage of itemsets that are pruned during candidate generation due to lacking frequent subsets. This significantly reduces the number of computations necessary, thus enhancing algorithm efficiency by focusing only on promising candidate itemsets .
Applying the Apriori algorithm with a 10% minimum support on datasets with different structural properties reveals insights into itemset prevalence. On datasets with dense vertical patterns (e.g., dataset e), numerous frequent itemsets with many subsets are produced, indicating prevalent co-purchasing behaviors. On the contrary, sparse datasets (e.g., dataset d) likely produce fewer or no frequent itemsets, demonstrating minimal co-occurrence. This analysis highlights how structural properties influence the result of frequent itemset mining, affecting not only itemset quantity but also their composition and meaningfulness .
The Apriori algorithm's process of candidate generation and pruning enhances efficiency by systematically eliminating non-promising itemsets early in the computation process. By leveraging downward closure property, it ensures that only itemsets with frequent subsets are considered, reducing the number of feasible candidates. The pruning ratio of 28.125% underscores its capability to disregard non-viable itemsets, thus conserving computational resources and accelerating frequent itemset identification. This selective approach optimizes performance in large datasets, ensuring focus only on potentially frequent patterns .
Using a vertical pattern dense dataset to generate frequent itemsets with varying support levels presents challenges, such as overwhelming computational resources due to the generation of numerous itemsets. Dense patterns suggest frequent co-occurrence, making it difficult to identify itemsets with significantly different support levels. The presence of both frequent and infrequent items in the same patterns can complicate pattern differentiation and require meticulous candidate pruning and validation to align with support variability needs, demanding higher computational effort and increased complexity in algorithm design .
Dense datasets typically lead to the generation of many frequent itemsets due to the high occurrence of items being bought together, as seen in dataset (e) which has dense vertical patterns. In contrast, sparse datasets like dataset (d) produce fewer frequent itemsets because the items do not co-occur frequently enough to meet the support threshold. Thus, the structure of the data significantly influences the output of the algorithm; dense patterns yield more frequent itemsets, while sparse patterns limit them .
Confidence is not a symmetric measure, as demonstrated by the rules {b, d} → {e} and {e} → {b, d}. The confidence of {b, d} → {e} is 1.0, while for {e} → {b, d} it is 0.25. This discrepancy arises because the support for {b, d, e} divided by the support for {b, d} differs from the support for {b, d, e} divided by the support for {e}, leading to different confidence values for each rule .
The dataset's structure greatly influences the maximum support and frequency distribution of discovered itemsets. In datasets with long horizontal patterns (e.g., dataset b), specific items appear in many contiguous transaction blocks, resulting in high maximum support for those items. Conversely, datasets with mixed item occurrences (e.g., dataset e) lead to frequent itemsets with widely varying support levels, as the combination of frequent and infrequent items results in itemsets with diverse support figures. Thus, the arrangement of items in datasets directly impacts support calculations and frequency distributions .