CHARM: An Efficient Algorithm for Closed Association Rule Mining

Similar documents
CHARM: An Efficient Algorithm for Closed Association Rule Mining

Scan Scheduling Specification and Analysis

Pincer-Search: An Efficient Algorithm. for Discovering the Maximum Frequent Set

Chapter 4: Association analysis:

Fast Vertical Mining Using Diffsets

A Fast Algorithm for Data Mining. Aarathi Raghu Advisor: Dr. Chris Pollett Committee members: Dr. Mark Stamp, Dr. T.Y.Lin

CLOSET+:Searching for the Best Strategies for Mining Frequent Closed Itemsets

Response Time Analysis of Asynchronous Real-Time Systems

CHAPTER 3 ASSOCIATION RULE MINING WITH LEVELWISE AUTOMATIC SUPPORT THRESHOLDS

SFU CMPT Lecture: Week 8

Closed Non-Derivable Itemsets

372 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 12, NO. 3, MAY/JUNE Scalable Algorithms for Association Mining

From Static to Dynamic Routing: Efficient Transformations of Store-and-Forward Protocols

Apriori Algorithm. 1 Bread, Milk 2 Bread, Diaper, Beer, Eggs 3 Milk, Diaper, Beer, Coke 4 Bread, Milk, Diaper, Beer 5 Bread, Milk, Diaper, Coke

Chapter 12: Indexing and Hashing

RSA (Rivest Shamir Adleman) public key cryptosystem: Key generation: Pick two large prime Ô Õ ¾ numbers È.

COFI Approach for Mining Frequent Itemsets Revisited

A General Greedy Approximation Algorithm with Applications

3 No-Wait Job Shops with Variable Processing Times

Mining Imperfectly Sporadic Rules with Two Thresholds

AC-Close: Efficiently Mining Approximate Closed Itemsets by Core Pattern Recovery

Query Processing & Optimization

Finding frequent closed itemsets with an extended version of the Eclat algorithm

CMTreeMiner: Mining Both Closed and Maximal Frequent Subtrees

Lecture Topic Projects 1 Intro, schedule, and logistics 2 Data Science components and tasks 3 Data types Project #1 out 4 Introduction to R,

CHAPTER 8. ITEMSET MINING 226

FastLMFI: An Efficient Approach for Local Maximal Patterns Propagation and Maximal Patterns Superset Checking

Chapter 11: Indexing and Hashing

On the Performance of Greedy Algorithms in Packet Buffering

CHAPTER 5 WEIGHTED SUPPORT ASSOCIATION RULE MINING USING CLOSED ITEMSET LATTICES IN PARALLEL

Association Pattern Mining. Lijun Zhang

Adaptive and Incremental Processing for Distance Join Queries

Designing Networks Incrementally

Efficiently Mining Frequent Trees in a Forest

Joint Entity Resolution

Chapter 12: Indexing and Hashing. Basic Concepts

RSA (Rivest Shamir Adleman) public key cryptosystem: Key generation: Pick two large prime Ô Õ ¾ numbers È.

Probabilistic analysis of algorithms: What s it good for?

Recoloring k-degenerate graphs

CHARM: An Efficient Algorithm for Closed Itemset Mining

Data Structure for Association Rule Mining: T-Trees and P-Trees

Frequent Pattern Mining. Based on: Introduction to Data Mining by Tan, Steinbach, Kumar

Efficiency versus Convergence of Boolean Kernels for On-Line Learning Algorithms

FP-Growth algorithm in Data Compression frequent patterns

gspan: Graph-Based Substructure Pattern Mining

Efficiently Mining Long Patterns from Databases

2. Discovery of Association Rules

Online Facility Location

CHAPTER V ADAPTIVE ASSOCIATION RULE MINING ALGORITHM. Please purchase PDF Split-Merge on to remove this watermark.

Memory issues in frequent itemset mining

Lecture 2 Wednesday, August 22, 2007

A Modality for Recursion

Frequent Itemsets Melange

Mining Association Rules in Large Databases

SFU CMPT Lecture: Week 9

A Hybrid Recursive Multi-Way Number Partitioning Algorithm

A Note on Karr s Algorithm

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

V Advanced Data Structures

AB AC AD BC BD CD ABC ABD ACD ABCD

Data Mining Part 3. Associations Rules

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

We show that the composite function h, h(x) = g(f(x)) is a reduction h: A m C.

620 HUANG Liusheng, CHEN Huaping et al. Vol.15 this itemset. Itemsets that have minimum support (minsup) are called large itemsets, and all the others

Association Rule Discovery

Finding Frequent Patterns Using Length-Decreasing Support Constraints

Theorem 2.9: nearest addition algorithm

Closed Pattern Mining from n-ary Relations

Chapter 6: Basic Concepts: Association Rules. Basic Concepts: Frequent Patterns. (absolute) support, or, support. (relative) support, s, is the

AXIOMS FOR THE INTEGERS

V Advanced Data Structures

PSON: A Parallelized SON Algorithm with MapReduce for Mining Frequent Sets

MINING frequent patterns or itemsets is a fundamental

GenMax: An Efficient Algorithm for Mining Maximal Frequent Itemsets

Disjoint, Partition and Intersection Constraints for Set and Multiset Variables

Chapter 7: Frequent Itemsets and Association Rules

Disjoint Sets and the Union/Find Problem

Advanced Database Systems

Chapter 12: Query Processing. Chapter 12: Query Processing

Ascending Frequency Ordered Prefix-tree: Efficient Mining of Frequent Patterns

Leveraging Set Relations in Exact Set Similarity Join

Slides for Faculty Oxford University Press All rights reserved.

Value Added Association Rules

Data Structure. IBPS SO (IT- Officer) Exam 2017

Bi-Objective Optimization for Scheduling in Heterogeneous Computing Systems

Chapter 12: Query Processing

End-to-end bandwidth guarantees through fair local spectrum share in wireless ad-hoc networks

A CSP Search Algorithm with Reduced Branching Factor

Chapter 13: Query Processing

CompSci 516 Data Intensive Computing Systems

MINING FREQUENT MAX AND CLOSED SEQUENTIAL PATTERNS

Indexing. Week 14, Spring Edited by M. Naci Akkøk, , Contains slides from 8-9. April 2002 by Hector Garcia-Molina, Vera Goebel

Query Processing. Debapriyo Majumdar Indian Sta4s4cal Ins4tute Kolkata DBMS PGDBA 2016

Improved Frequent Pattern Mining Algorithm with Indexing

Association Rule Discovery

Chapter 12: Indexing and Hashing

Survey on Frequent Pattern Mining

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

Mining Association Rules in Large Databases

Transcription:

HRM: n Efficient lgorithm for losed ssociation Rule Mining Mohammed J. Zaki and hing-jui Hsiao omputer Science epartment Rensselaer Polytechnic Institute, Troy NY 8 zaki,hsiaoc @cs.rpi.edu http://www.cs.rpi.edu/ zaki bstract The task of mining association rules consists of two main steps. The first involves finding the set of all frequent itemsets. The second step involves testing and generating all high confidence rules among itemsets. In this paper we show that it is not necessary to mine all frequent itemsets in the first step, instead it is sufficient to mine the set of closed frequent itemsets, which is much smaller than the set of all frequent itemsets. It is also not necessary to mine the set of all possible rules. We show that any rule between itemsets is equivalent to some rule between closed itemsets. Thus many redundant rules can be eliminated. Furthermore, we present HRM, an efficient algorithm for mining all closed frequent itemsets. n extensive experimental evaluation on a number of real and synthetic databases shows that HRM outperforms previous methods by an order of magnitude or more. It is also linearly scalable in the number of transactions and the number of closed itemsets found. Introduction Since its introduction, ssociation Rule Mining [], has become one of the core data mining tasks, and has attracted tremendous interest among data mining researchers and practitioners. It has an elegantly simple problem statement, that is, to find the set of all subsets of items (called itemsets) that frequently occur in many database records or transactions, and to extract the rules telling us how a subset of items influences the presence of another subset. The prototypical application of associations is in market basket analysis, where the items represent products and the records the point-of-sales data at large grocery or departmental stores. These kinds of database are generally sparse, i.e., the longest frequent itemsets are relatively short. However there are many real-life datasets that very dense, i.e., they contain very long frequent itemsets. It is widely recognized that the set of association rules can rapidly grow to be unwieldy, especially as we lower the frequency requirements. The larger the set of frequent itemsets the more the number of rules presented to the user, many of which are redundant. This is true even for sparse datasets, but for dense datasets it is simply not feasible to mine all possible frequent itemsets, let alone to generate rules between itemsets. In such datasets one typically finds an exponential number of frequent itemsets. For example, finding long itemsets of length 3 or is not uncommon []. In this paper we show that it is not necessary to mine all frequent itemsets to guarantee that all non-redundant association rules will be found. We show that it is sufficient to consider only the closed frequent itemsets (to be defined later). Further, all non-redundant rules are found by only considering rules among the closed frequent itemsets. The set of closed frequent itemsets is a lot smaller than the set of all frequent itemsets, in some cases by 3 or more orders of magnitude. Thus even in dense domains we can guarantee completeness, i.e., all non-redundant association rules can be found. The main computation intensive step in this process is to identify the closed frequent itemsets. It is not possible to generate this set using priori-like [] bottom-up search methods that examine all subsets of a frequent itemset. Neither is it possible to mine these sets using algorithms for mining maximal frequent patterns like MaxMiner [] or Pincer-Search [9], since to find the closed itemsets all subsets of the maximal frequent itemsets would have to be examined.

We introduce HRM, an efficient algorithm for enumerating the set of all closed frequent itemsets. HRM is unique in that it simultaneously explores both the itemset space and transaction space, unlike all previous association mining methods which only exploit the itemset search space. Furthermore, HRM avoids enumerating all possible subsets of a closed itemset when enumerating the closed frequent sets. The exploration of both the itemset and transaction space allows HRM to use a novel search method that skips many levels to quickly identify the closed frequent itemsets, instead of having to enumerate many non-closed subsets. Further, HRM uses a two-pronged pruning strategy. It prunes candidates based not only on subset infrequency (i.e., no extensions of an infrequent are tested) as do all association mining methods, but it also prunes candidates based on non-closure property, i.e., any non-closed itemset is pruned. Finally, HRM uses no internal data structures like Hash-trees [] or Tries [3]. The fundamental operation used is an union of two itemsets and an intersection of two transactions lists where the itemsets are contained. n extensive set of experiments confirms that HRM provides orders of magnitude improvement over existing methods for mining closed itemsets, even over methods like lose [], that are specifically designed to mine closed itemsets. It makes a lot fewer database scans than the longest closed frequent set found, and it scales linearly in the number of transactions and also is also linear in the number of closed itemsets found. The rest of the paper is organized as follows. Section describes the association mining task. Section 3 describes the benefits of mining closed itemsets and rules among them. We present HRM in Section. Related work is discussed in Section. We present experiments in Section and conclusions in Section 7. ssociation Rules The association mining task can be stated as follows: Let Á ½ ¾ Ñ be a set of items, and let Ì ½ ¾ Ò be a set of transaction identifiers or tids. The input database is a binary relation Æ Á Ì. If an item occurs in a transaction Ø, we write it as ص ¾ Æ, or alternately as ÆØ. Typically the database is arranged as a set of transaction, where each transaction contains a set of items. For example, consider the database shown in Figure, used as a running example throughout this paper. Here Á Ì Ï, and Ì ½ ¾. The second transaction can be represented as ƾ ƾ Ï Æ¾ ; all such pairs from all transactions, taken together form the binary relation Æ. set Á is also called an itemset, and a set Ì is called a tidset. For convenience we write an itemset Ï as Ï, and a tidset ¾ as ¾. The support of an itemset, denoted µ, is the number of transactions in which it occurs as a subset. n itemset is frequent if its support is more than or equal to a user-specified minimum support (minsup) value, i.e., if µ minsup. Ô n association rule is an expression ½ ¾, where ½ and ¾ are itemsets, and ½ ¾. The support of the rule is given as ½ ¾ µ (i.e., the joint probability of a transaction containing both ½ and ¾ ), and the confidence as Ô ½ ¾ µ ½ µ (i.e., the conditional probability that a transaction contains ¾, given that it contains ½ ). rule is frequent if the itemset ½ ¾ is frequent. rule is confident if its confidence is greater than or equal to a user-specified minimum confidence (minconf) value, i.e, Ô minconf. The association rule mining task consists of two steps []: ) Find all frequent itemsets, and ) Generate high confidence rules. Finding frequent itemsets This step is computationally and I/O intensive. onsider Figure, which shows a bookstore database with six customers who buy books by different authors. It shows all the frequent itemsets with Ñ Ò ÙÔ ¼± (i.e., 3 transactions). Ì Ï and Ï are the maximal-by-inclusion frequent itemsets (i.e., they are not a subset of any other frequent itemset). Let Á Ñ be the number of items. The search space for enumeration of all frequent itemsets is ¾ Ñ, which is exponential in Ñ. One can prove that the problem of finding a frequent set of a certain size is NP-omplete, by reducing it to the balanced bipartite clique problem, which is known to be NP-omplete [8, 8]. However, if we assume that there is a bound on the transaction length, the task of finding all frequent itemsets is essentially linear in the database size, since the overall complexity in this case is given as Ç Ö Ò ¾ Ð µ, where Ì Ò is the number of transactions, Ð is the length of the longest frequent itemset, and Ö is the number of maximal frequent itemsets.

Jane usten ISTINT TBSE ITEMS gatha hristie Sir rthur onan oyle Mark Twain P. G. Wodehouse T W TBSE Transcation Items T W W 3 T W W T W T LL FREQUENT ITEMSETS MINIMUM SUPPORT = % Support % () 83% () 7% () % (3) Itemsets W, W,, T,, W, T, W T, W, TW, T, TW W, TW, TW Figure : Generating Frequent Itemsets Generating confident rules This step is relatively straightforward; rules of the form ¼ Ô ¼, are generated for all frequent itemsets (where ¼, and ¼ ), provided Ô minconf. For an itemset of size there are ¾ ¾ potentially confident rules that can be generated. This follows from the fact that we must consider each subset of the itemset as an antecedent, except for the empty and the full itemset. The complexity of the rule generation step is thus Ç ¾ Ð µ, where is the number of frequent itemsets, and Ð is the longest frequent itemset (note that can be Ç Ö ¾ Ð µ, where Ö is the number of maximal frequent itemsets). For example, from the frequent itemset Ï we can generate possible rules (all of them have support of ): ½ ¼ Ï ¼ Ï Ï ¼ ½ ¼ Ï Ï ½ ¼, and Ï ¼. 3 losed Frequent Itemsets In this section we develop the concept of closed frequent itemsets, and show that this set is necessary and sufficient to capture all the information about frequent itemsets, and has smaller cardinality than the set of all frequent itemsets. 3. Partial Order and Lattices We first introduce some lattice theory concepts (see [] for a good introduction). Let È be a set. partial order on È is a binary relation, such that for all Ü Ý Þ ¾ È, the relation is: ) Reflexive: Ü Ü. ) nti-symmetric: Ü Ý and Ý Ü, implies Ü Ý. 3) Transitive: Ü Ý and Ý Þ, implies Ü Þ. The set È with the relation is called an ordered set, and it is denoted as a pair (È ). We write Ü Ý if Ü Ý and Ü Ý. Let È µ be an ordered set, and let Ë be a subset of È. n element Ù ¾ È is an upper bound of Ë if Ù for all ¾ Ë. n element Ð ¾ È is a lower bound of Ë if Ð for all ¾ Ë. The least upper bound is called the join of Ë, and is denoted as Ï Ë, and the greatest lower bound is called the meet of Ë, and is denoted as Î Ë. If Ë Ü Ý, we also write Ü Ý for the join, and Ü Ý for the meet. n ordered set Ä µ is a lattice, if for any two elements Ü and Ý in Ä, the join Ü Ý and meet Ü Ý always exist. Ä is a complete lattice if Ï Ë and Î Ë exist for all Ë Ä. ny finite lattice is complete. Ä is called a join semilattice if only the join exists. Ä is called a meet semilattice if only the meet exists. Let È denote the power set of Ë (i.e., the set of all subsets of Ë). The ordered set (È Ëµ ) is a complete lattice, where the meet is given by set intersection, and the join is given by set union. For example the partial orders È Áµ µ, the set of all possible itemsets, and È Ì µ µ, the set of all possible tidsets are both complete lattices. The set of all frequent itemsets, on the other hand, is only a meet-semilattice. For example, consider Figure, which shows the semilattice of all frequent itemsets we found in our example database (from Figure ). For any two itemsets, only their meet is guaranteed to be frequent, while their join may or may not be frequent. This follows from 3

TW (TW x 3) T W TW W TW (T x 3) (W x 3) (TW x 3) (W x ) (TW x 3) ( x 3) T W T W W TW ( x ) (T x 3) (W x 3) (T x 3) (W x 3) (W x ) (TW x 3) T W ( x 3) ( x 3) ( x ) (T x 3) (W x 3) Figure : Meet Semi-lattice of Frequent Itemsets the well known principle in association mining that, if an itemset is frequent, then all its subsets are also frequent. For example, Ì Ì is frequent. For the join, while Ì Ì Ì is frequent, Ï Ï is not frequent. 3. losed Itemsets Let the binary relation Æ Á Ì be the input database for association mining. Let Á, and Ì. Then the mappings Ø Á Ì Ø µ Ý ¾ Ì Ü ¾ ÜÆÝ Ì Á µ Ü ¾ Á Ý ¾ ÜÆÝ define a Galois connection between the partial orders È Áµ µ and È Ì µ µ, the power sets of Á and Ì, respectively. We denote a ( Ø µ) pair as Ø µ, and a ( µ ) pair as µ. Figure 3 illustrates the two mappings. The mapping Ø µ is the set of all transactions (tidset) which contain the itemset, similarly µ is the itemset that is contained in all the transactions in. For example, Ø Ï µ ½, and ¾ µ Ï. In terms of individual elements Ì Ø µ ܾ Ø Üµ, and Ì µ ݾ ݵ. For example Ø Ï µ Ø µ Ø µ Ø Ï µ ½ ½¾ ½¾ ½. lso ¾ µ ¾µ µ µ Ï Ï Ì Ï Ï. The Galois connection satisfies the following properties (where ½ ¾ ¾ È Áµ and ½ ¾ ¾ È Ì µ): ) ½ ¾ µ Ø ½ µ Ø ¾ µ. For Ï Ì Ï, we have Ø Ï µ ½ ½ Ø Ì Ï µ. ) ½ ¾ µ ½ µ ¾ µ. For example, for ¾ ¾, we have ¾ µ Ï ¾ µ. 3) Ø µµ and Ø µµ. For example, Ø µµ ½ µ Ï. Let Ë be a set. function È Ëµ È Ëµ is a closure operator on S if, for all Ë, satisfies the following properties: ) Extension: µ. ) Monotonicity: if, then µ µ. 3) Idempotency: µµ µ. subset of Ë is called closed if µ. Lemma Let Á and Ì. Let Ø µ denote the composition of the two mappings Æ Ø µ Ø µµ. ually, let Ø µ Ø Æ µ Ø µµ. Then Ø È Áµ È Áµ and Ø È Ì µ È Ì µ are both closure operators on itemsets and tidsets respectively. We define a closed itemset as an itemset that is the same as its closure, i.e., Ø µ. For example the itemset Ï is closed. closed tidset is a tidset Ø µ. For example, the tidset ½ is closed. The mappings Ø and Ø, being closure operators, satisfy the three properties of extension, monotonicity, and idempotency. We also call the application of Æ Ø or Ø Æ a round-trip. Figure illustrates this round-trip starting with an itemset. For example, let, then the extension property says that is a subset of its closure, since Ø µ Ø µµ ½ µ Ï. Since Ø µ Ï, we conclude that is not closed. On the other hand, the idempotency property say that once we map an itemset to the tidset that contains

ITEMS TRNSTIONS ITEMS TRNSTIONS X t t(x) X t t(x) i(y) i Y i it (X) = i(t(x)) Figure 3: Galois onnection Figure : losure Operator: Round-Trip it, and then map that tidset back to the set of items common to all tids in the tidset, we obtain a closed itemset. fter this no matter how many such round-trips we make we cannot extend a closed itemset. For example, after one round-trip for we obtain the closed itemset Ï. If we perform another round-trip on Ï, we get Ø Ï µ Ø Ï µµ ½ µ Ï. For any closed itemset, there exists a closed tidset given by, with the property that Ø µ and µ (conversely, for any closed tidset there exists a closed itemset). We can see that is closed by the fact that µ, then plugging Ø µ, we get µ Ø µµ Ø µ, thus is closed. ually, is closed. For example, we have seen above that for the closed itemset Ï the associated closed tidset is ½. Such a closed itemset and closed tidset pair is called a concept. (TW x ) (TW x 3) (W x ) (W x ) (T x ) (TW x 3) (W x ) (W x 3) (T x 3) ( x ) (W x 3) (T x 3) ( x ) (W x 3) (W x 3) ( x 3) ( x 3) Figure : Galois Lattice of oncepts Figure : Frequent oncepts concept ½ ½ is a subconcept of ¾ ¾, denoted as ½ ½ ¾ ¾, iff ½ ¾ (iff ¾ ½ ). Let Ƶ denote the set of all possible concepts in the database, then the ordered set Ƶ µ is a complete lattice, called the Galois lattice. For example, Figure shows the Galois lattice for our example database, which has a total of concepts. The least element is the concept ½¾ and the greatest element is the concept Ì Ï. Notice that the mappings between the closed pairs of itemsets and tidsets are anti-isomorphic, i.e., concepts with large cardinality itemsets have small tidsets, and vice versa. 3.3 losed Frequent Itemsets vs. ll Frequent Itemsets We begin this section by defining the join and meet operation on the concept lattice (see [] for the formal proof): The set of all concepts in the database relation Æ, given by Ƶ µ is a (complete) lattice with join and meet given by join: ½ ½ µ ¾ ¾ µ Ø ½ ¾ µ ½ ¾ µ

meet: ½ ½ µ ¾ ¾ µ ½ ¾ µ Ø ½ ¾ µ For the join and meet of multiple concepts, we simply take the unions and joins over all of them. For example, consider the join of two concepts, Ï µ Ì µ Ø Ï Ì µ µ Ì Ï. On the other hand their meet is given as, Ï µ Ì µ Ï Ì µ Ø µ Ø µ ¾. Similarly, we can perform multiple concept joins or meets; for example, Ì ½ µ ¾ µ Ï ¾ µ Ø Ì Ï µ ½ ¾ ¾ µ Ø Ì Ï µ Ì Ï. We define the support of a closed itemset or a concept as the cardinality of the closed tidset Ø µ, i.e, µ Ø µ. closed itemset or a concept is frequent if its support is at least minsup. Figure shows all the frequent concepts with minsup = % (i.e., with tidset cardinality at least 3). The frequent concepts, like the frequent itemsets, form a meet-semilattice, where the meet is guaranteed to exist, while the join may not. Theorem For any itemset, its support is equal to the support of its closure, i.e., µ Ø µµ. PROOF: The support of an itemset is the number of transactions where it appears, which is exactly the cardinality of the tidset Ø µ, i.e., µ Ø µ. Since Ø µµ Ø Ø µµ, to prove the lemma, we have to show that Ø µ Ø Ø µµ. Since Ø is closure operator, it satisfies the extension property, i.e., Ø µ Ø Ø µµ Ø Ø µµµ Ø Ø µµ. Thus Ø µ Ø Ø µµ. On the other hand since Ø is also a closure operator, Ø µ, which in turn implies that Ø µ Ø Ø µµ, due to property ) of Galois connections. Thus Ø µ Ø Ø µµ. This lemma states that all frequent itemsets are uniquely determined by the frequent closed itemsets (or frequent concepts). Furthermore, the set of frequent closed itemsets is bounded above by the set of frequent itemsets, and is typically much smaller, especially for dense datasets (where there can be orders of magnitude differences). To illustrate the benefits of closed itemset mining, contrast Figure, showing the set of all frequent itemsets, with Figure, showing the set of all closed frequent itemsets (or concepts). We see that while there are only 7 closed frequent itemsets, there are 9 frequent itemsets. This example clearly illustrates the benefits of mining the closed frequent itemsets. 3. Rule Generation Ô Recall that an association rule is of the form ½ ¾, where ½ ¾ Á. Its support equals Ø ½ ¾ µ, and its confidence is given as Ô Ø ½ ¾ µ Ø ½ µ. We are interested in finding all high support (at least minsup) and high confidence rules (at least minconf). It is widely recognized that the set of such association rules can rapidly grow to be unwieldy. The larger the set of frequent itemsets the more the number of rules presented to the user. However, we show below that it is not necessary to mine rules from all frequent itemsets, since most of these rules turn out to be redundant. In fact, it is sufficient to consider only the rules among closed frequent itemsets (or concepts), as stated in the theorem below. Theorem The rule ½ Ô ¾ is equivalent to the rule Ø ½ µ Õ Ø ¾ µ, where Õ Ô. PROOF: It follows immediately from the fact that the support of an itemset is equal to the support of its closure Ø µ, i.e., Ø µ Ø Ø µµ. Using this fact we can show that Õ Ø Ø ½ µ Ø ¾ µµ Ø Ø ½ µµ Ø Ø ½ µµ Ø Ø ¾ µµ Ø ½ µ Ø ½µ Ø ¾ µ Ø ½ µ Ø ½ ¾ µ Ø ½ µ There are typically many (in the worst case, an exponential number of) frequent itemsets that map to the same closed frequent itemset. Let s assume that there are Ò itemsets, given by the set Ë ½, whose closure is ½ and Ñ itemsets, given by the set Ë ¾, whose closure is ¾, then we say that all Ò Ñ ½ rules between two non-closed itemsets directed from Ë ½ to Ë ¾ are redundant. They are all equivalent to the rule ½ Ô ¾. Further the Ñ Ò ½ rules directed from Ë ¾ to Ë ½ are also redundant, and equivalent to the rule ¾ Õ ½. For example, looking at Figure we find that the itemsets and map to the closed itemset, and the itemsets Ï and Ï map to the closed itemset Ï. onsidering rules from the former to latter set we find that the rules Ï, Ï, and Ï are all equivalent to the rule between closed itemsets Ï. On the other hand, if we consider the rules from the latter set to the former, we find that Ï, Ï, Ï are all equivalent to the rule Ï. Ô

We should present to the user the most general rules (other rules are more specific; they contain one or more additional items in the antecedent or consequent) for each direction, i.e., the rules Ï and Ï (provided minconf ¼ ). Thus using the closed frequent itemsets we would generate only rules instead of 8 rules normally generated between the two sets. To get an idea of the number of redundant rules mined in traditional association mining, for one dataset (mushroom), at % minimum support, we found ½ frequent itemsets, out of which only were closed, a reduction of more than times! HRM: lgorithm esign and Implementation Having developed the main ideas behind closed association rule mining, we now present HRM, an efficient algorithm for mining all the closed frequent itemsets. We will first describe the algorithm in general terms, independent of the implementation details. We then show how the algorithm can be implemented efficiently. This separation of design and implementation aids comprehension, and allows the possibility of multiple implementations. HRM is unique in that it simultaneously explores both the itemset space and tidset space, unlike all previous association mining methods which only exploit the itemset space. Furthermore, HRM avoids enumerating all possible subsets of a closed itemset when enumerating the closed frequent sets, which rules out a pure bottom-up search. This property is important in mining dense domains with long frequent itemsets, where bottom-up approaches are not practical (for example if the longest frequent itemset is Ð, then bottom-up search enumerates all ¾ Ð frequent subsets). The exploration of both the itemset and tidset space allows HRM to use a novel search method that skips many levels to quickly identify the closed frequent itemsets, instead of having to enumerate many non-closed subsets. Further, HRM uses a two-pronged pruning strategy. It prunes candidates based not only on subset infrequency (i.e., no extensions of an infrequent itemset are tested) as do all association mining methods, but it also prunes branches based on non-closure property, i.e., any non-closed itemset is pruned. Finally, HRM uses no internal data structures like Hash-trees [] or Tries [3]. The fundamental operation used is an union of two itemsets and an intersection of their tidsets. {} T W T W T W T W TW T W T W TW T W TW TW T W TW TW TW TW Figure 7: omplete Subset Lattice onsider Figure 7 which shows the complete subset lattice (only the main parent link has been shown to reduce clutter) over the five items in our example database (see Figure ). The idea in HRM is to process each lattice node to test if its children are frequent. ll infrequent, as well as non-closed branches are pruned. Notice that the children of each node are formed by combining the node by each of its siblings that come after it in the branch ordering. For example, has to be combined with its siblings Ì and Ï to produce the children Ì and Ï. sibling need not be considered if it has already been pruned because of infrequency or non-closure. While a lexical ordering of branches is shown in the figure, we will see later how a different branch ordering (based on 7

support) can improve the performance of HRM (a similar observation was made in MaxMiner []). While many search schemes are possible (e.g., breadth-first, depth-first, best-first, or other hybrid search), HRM performs a depth-first search of the subset lattice.. HRM: lgorithm esign In this section we assume that for any itemset, we have access to its tidset Ø µ, and for any tidset we have access to its itemset µ. How to practically generate Ø µ or µ will be discussed in the implementation section. HRM actually enumerates all the frequent concepts in the input database. Recall that a concept is given as a pair, where µ is a closed itemset, and Ø µ is a closed tidset. We can start the search for concepts over the tidset space or the itemset space. However, typically the number of items is a lot smaller than the number of transactions, and since we are ultimately interested in the closed itemsets, we start the search with the single items, and their associated tidsets. ITEMS TRNSTIONS ITEMS TRNSTIONS X t t X t t t(x) t(x) X i t(x) = t(x) X i it (X) = it (X) it (X) = it (X U X) t(x) U t(x) ITEMS TRNSTIONS ITEMS TRNSTIONS t t(x) X X t t(x) i X X t t i i t(x) t(x) it (X) = t(x) t(x) it (X U X) it (X)!= it (X) U t(x)!= t(x) Figure 8: Basic Properties of Itemsets and Tidsets.. Basic Properties of Itemset-Tidset Pairs Let È Áµ Æ be a one-to-one mapping from itemsets to integers. For any two itemsets ½ and ¾, we say ½ ¾ iff ½ µ ¾ µ. defines a total order over the set of all itemsets. For example, if denotes the lexicographic ordering, then itemset. s another example, if sorts itemsets in increasing order of their support, then if support of is less than the support of. Let s assume that we are processing the branch ½ Ø ½ µ, and we want to combine it with its sibling ¾ Ø ¾ µ. That is ½ ¾ (under a suitable total order ). The main computation in HRM relies on the following properties.. If Ø ½ µ Ø ¾ µ, then Ø ½ ¾ µ Ø ½ µ Ø ¾ µ Ø ½ µ Ø ¾ µ. Thus we can simply replace every occurrence of ½ with ½ ¾, and remove ¾ from further consideration, since its closure is identical to the closure of ½ ¾. In other words, we treat ½ ¾ as a composite itemset.. If Ø ½ µ Ø ¾ µ, then Ø ½ ¾ µ Ø ½ µ Ø ¾ µ Ø ½ µ Ø ¾ µ. Here we can replace every occurrence of ½ with ½ ¾, since if ½ occurs in any transaction, then ¾ always occurs there too. But since Ø ½ µ Ø ¾ µ we cannot remove ¾ from consideration; it generates a different closure. 3. If Ø ½ µ Ø ¾ µ, then Ø ½ ¾ µ Ø ½ µ Ø ¾ µ Ø ¾ µ Ø ½ µ. In this we replace every occurrence of ¾ with ½ ¾, since wherever ¾ occurs ½ always occurs. ½ however, produces a different closure, and it must be retained. 8

. If Ø ½ µ Ø ¾ µ, then Ø ½ ¾ µ Ø ½ µ Ø ¾ µ Ø ¾ µ Ø ½ µ. In this case, nothing can be eliminated; both ½ and ¾ lead to different closures. Figure 8 pictorially depicts the four cases. We see that only closed tidsets are retained after we combine two itemsettidset pairs. For example, if the two tidsets are equal, one of them is pruned (Property ). If one tidset is a subset of another, then the resulting tidset is equal to the smaller tidset from the parent and we eliminate that parent (Properties and 3). Finally if the tidsets are unequal, then those two and their intersection are all closed. Example Before formally presenting the algorithm, we show how the four basic properties of itemset-tidset pairs are exploited in HRM to mine the closed frequent itemsets. {} {} x 3 x 3 W x 3 x 3 x T x 3 W x 3 x 3 W x 3 W x 3 x T x 3 x T x 3 W x 3 W x 3 x 3 x T x 3 x T x 3 W x 3 TW x 3 T x W x TW x 3 Figure 9: HRM: Lexicographic Order x T x 3 TW x 3 TW x 3 T x W x TW x 3 W x TW x 3 Figure : HRM:Sorted by Increasing Support onsider Figure 9. Initially we have five branches, corresponding to the five items and their tidsets from our example database (recall that we used minsup = 3). To generate the children of item (or the pair ½ ) we need to combine it with all siblings that come after it. When we combine two pairs ½ Ø ½ µ and ¾ Ø ¾ µ, the resulting pair is given as ½ ¾ µ Ø ½ µ Ø ¾ µµ. In other words we need to perform the intersection of corresponding tidsets whenever we combine two or more itemsets. When we try to extend with, we find that property is true, i.e., Ø µ ½ ½¾ Ø µ. We can thus remove and replace it with. ombining with produces an infrequent set, which is pruned. ombination with Ì produces the pair Ì ½ ; property holds here, so nothing can be pruned. When we try to combine with Ï we find that Ø µ Ø Ï µ. ccording to property, we replace all unpruned occurrences of with Ï. Thus becomes Ï and Ì becomes Ì Ï. t this point there is nothing further to be processed from the branch of the root. We now start processing the branch. When we combine with we observe that property 3 holds, i.e., Ø µ Ø µ. This means that wherever occurs always occurs. Thus can be removed from further consideration, and the entire branch is pruned; the child replaces. Exactly the same scenario occurs with Ì and Ï. Both the branches are pruned and are replaced by Ì and Ï as children of. ontinuing in a depth-first manner, we next process the node. ombining it with Ì produces an infrequent itemset Ì, which is pruned. ombination with Ï produces Ï and since property holds, nothing can be removed. Similarly the combination of Ì and Ï produces Ì Ï. t this point all branches have been processed. Finally, we remove Ì Ï ½ since it is contained in Ì Ï ½. s we can see, in just steps we have identified all 7 closed frequent itemsets... HRM: Pseudo-ode escription Having illustrated the workings of HRM on our example database, we now present the pseudo-code for the algorithm itself. The algorithm starts by initializing the set of nodes to be examined to the frequent single items and their tidsets in Line. The main computation is performed in HRM-EXTEN which returns the set of closed frequent itemsets. 9

HRM-EXTEN is responsible for testing each branch for viability. It extracts each itemset-tidset pair in the current node set ÆÓ ( Ø µ, Line 3), and combines it with the other pairs that come after it ( Ø µ, Line ) according to the total order (we have already seen an example of lexical ordering in Figure 9; we will look at support based ordering below). The combination of the two itemset-tidset pairs is computed in Line. The routine HRM-PROPERTY tests the resulting set for required support and also applies the four properties discussed above. Note that this routine may modify the current node set by deleting itemset-tidset pairs that are already contained in other pairs. It also inserts the newly generated children frequent pairs in the set of new nodes Æ ÛÆ. If this set is non-empty we recursively process it in depth-first manner (Line 8). We then insert the possibly extended itemset, of, in the set of closed itemsets, since it cannot be processed further; at this stage any closed itemset containing has already been generated. We then return to Line 3 to process the next (unpruned) branch. The routine HRM-PROPERTY simply tests if a new pair is frequent, discarding it if it is not. It then tests each of the four basic properties of itemset-tidset pairs, extending existing itemsets, removing some subsumed branches from the current set of nodes, or inserting new pairs in the node set for the next (depth-first) step. HRM (Æ Á Ì, minsup):. Nodes = Á Ø Á µ Á ¾ Á Ø Á µ minsup. HRM-EXTEN (Nodes, ) HRM-EXTEN (Nodes, ): 3. for each Ø µ in Nodes. NewN = and. for each Ø µ in Nodes, with µ µ. and Ø µ Ø µ 7. HRM-PROPERTY(Nodes, NewN) 8. if NewN then HRM-EXTEN (NewN) 9. //if X is not subsumed HRM-PROPERTY (Nodes, NewN):. if ( minsup) then. if Ø µ Ø µ then //Property. 3. Remove from Nodes Replace all with.. else if Ø µ Ø µ then //Property Replace all with. else if Ø µ Ø µ then //Property 3 7. 8. Remove from Nodes dd to NewN 9.. else if Ø µ Ø µ then //Property dd to NewN Figure : The HRM lgorithm..3 Branch Reordering We purposely let the itemset-tidset pair ordering function in Line remain unspecified. The usual manner of processing is in lexicographic order, but we can specify any other total order we want. The most promising approach is to sort the itemsets based on their support. The motivation is to increase opportunity for non-closure based pruning of itemsets. quick look at Properties and tells us that these two situations are preferred over the other two cases. For Property, the closure of the two itemsets is equal, and thus we can discard and replace with. For Property, we can still replace with. Note that in both these cases we do not insert anything in the new nodes! Thus the more the occurrence of case and, the fewer levels of search we perform. In contrast, the occurrence of cases 3 and results in additions to the set of new nodes, requiring additional levels of processing. Note that the reordering is applied for each new node set, starting with the initial branches. Since we want Ø µ Ø µ or Ø µ Ø µ it follows that we should sort the itemsets in increasing order of their support. Thus larger tidsets occur later in the ordering and we maximize the occurrence of Properties and. By similar reasoning, sorting by decreasing order of support doesn t work very well, since it maximizes the occurrence of Properties 3 and, increasing the number of levels of processing. Example Figure shows how HRM works on our example database if we sort itemsets in increasing order of support. We will use the pseudo-code to illustrate the computation. We initialize ÆÓ = ½ ¾ Ì ½ Ï ½¾ ½¾ in Line. t Line 3 we first process the branch ½ (we set in Line ); it will be combined with the remaining siblings in Line. is not frequent and is pruned. We next look at and Ì ; since Ø µ Ø Ì µ, we simply insert Ì in Æ ÛÆ. We next find that Ø µ Ø Ï µ. Thus we replace all occurrences of with Ï (thus Ï ), which means that we also change Ì in Æ ÛÆ to Ì Ï. Looking at and, we find that Ø µ Ø µ. Thus

Ï becomes Ï ( Ï ), and Ì Ï in Æ ÛÆ becomes Ì Ï. t this point HRM-EXTEN is invoked with the non-empty Æ ÛÆ (Line 8). But since there is only one element, we immediately exit after adding Ì Ï ½ to the set of closed frequent itemsets (Line 9). When we return, the branch has been completely processed, and we add Ï to. The other branches are examined in turn, and the final is produced as shown in Figure. One final note; the pair Ì Ï ½ produced from the Ì branch is not closed, since it is subsumed by Ì Ï ½, and it is eliminated in Line 9.. HRM: Implementation etails We now describe the implementation details of HRM and how it departs from the pseudo-code in some instances for performance reasons. ata Format Given that we are manipulating itemset-tidset pairs, and that the fundamental operation is that of intersecting two tidsets, HRM uses a vertical data format, where we maintain a disk-based list for each item, listing the tids where that item occurs. In other words, the data is organized so that we have available on disk the tidset for each item. In contrast most of the current association algorithms [,, 3] assume a horizontal database layout, consisting of a list of transactions, where each transaction has an identifier followed by a list of items in that transaction. The vertical format has been shown to be successful for association mining. It has been used in Partition [], in (Max)Eclat and (Max)lique [9], and shown to lead to very good performance. In fact, the Vertical algorithm [] was shown to be the best approach (better than horizontal) when tightly integrating association mining with database systems. The benefits of using the vertical format have further been demonstrated in Monet [], a new high-performance database system for query-intensive applications like OLP and data mining. Intersections and Subset Testing Given the availability of vertical tidsets for each itemset, the computation of the tidset intersection for a new combination is straightforward. ll it takes is a linear scan through the two tidsets, storing matching tids in a new tidset. For example, we have Ø µ ½ and Ø µ ¾. Then Ø µ ½ ¾. The main question is how to efficiently compute the subset information required while applying the four properties. t first this might appear like an expensive operation, but in fact in the vertical format, it comes for free. When intersecting two tidsets we keep track of the number of mismatches in both the lists, i.e., the cases when a tid occurs in one list but not in the other. Let Ñ ½ µ and Ñ ¾ µ denote the number of mismatches in the tidsets for itemsets ½ and ¾. There are four cases to consider: Ñ ½ µ ¼ and Ñ ¾ µ ¼ then Ø ½ µ Ø ¾ µ Property Ñ ½ µ ¼ and Ñ ¾ µ ¼ then Ø ½ µ Ø ¾ µ Property Ñ ½ µ ¼ and Ñ ¾ µ ¼ then Ø ½ µ Ø ¾ µ Property 3 Ñ ½ µ ¼ and Ñ ¾ µ ¼ then Ø ½ µ Ø ¾ µ Property For Ø µ and Ø µ from above, Ñ µ ¾ and Ñ µ ¾, and as we can see, Ø µ Ø µ. Next consider Ø µ ½ and Ø Ï µ ½¾. We find Ñ µ ¼, but Ñ Ï µ ½, which shows that Ø µ Ø Ï µ. Thus HRM performs support, subset, equality, and inequality testing simultaneously while computing the intersection itself. Eliminating Non-losed Itemsets Here we describe a fast method to avoid adding non-closed itemsets to the set of closed frequent itemsets in Line 9. If we are adding a set, we have to make sure that there doesn t exist a set ¾ such that and both have the same support (MaxMiner [] faces a similar problem while eliminating non-maximal itemsets). learly we want to avoid comparing with all existing elements in, for this would lead to a Ç ¾ µ complexity. The solution is to store in a hash table. But what hash function to use? Since we want to perform subset checking, we can t hash on the itemset. We could use the support of the itemsets for the hash function. But many unrelated subsets may have the same support. HRM uses the sum of the tids in the tidset as the hash function, i.e., È µ Ì ¾Ø µ Ì. This reduces the chances of unrelated itemsets being in the same cell. Each hash table cell is a linked list sorted by support as primary

key and the itemset as the secondary key (i.e., lexical). Before adding to, we hash to the cell, and check if is a subset of only those itemsets with the same support as. We found experimentally that this approach adds only a few seconds of additional processing time to the total execution time. Optimized Initialization There is only one significant departure from the pseudo-code in Figure. Note that if we initialize the ÆÓ set in Line with all frequent items, and invoke HRM-EXTEN then, in the worst case, we might perform Ò Ò ½µ ¾ tidset intersections, where Ò is the number of frequent items. If Ð is the average tidset size in bytes, the amount of data read is Ð Ò Ò ½µ ¾ bytes. ontrast this with the horizontal approach that reads only Ð Ò bytes. It is well known that many itemsets of length turn out to be infrequent, thus it is clearly wasteful to perform Ç Ò ¾ µ intersection. To solve this performance problem we first compute the set of frequent itemsets of length, and then we add a simple check in Line, so that we combine two items Á and Á only if Á Á is known to be frequent. The number of intersections performed after this check is equal to the number of frequent pairs, which is in practice closer to Ç Òµ rather than Ç Ò ¾ µ. Further this check only has to be done initially only for single items, and not in later stages. We now describe how we compute the frequent itemsets of length using the vertical format. s noted above we clearly cannot perform all intersections between pairs of frequent items. The solution is to perform a vertical to horizontal transformation on-the-fly. For each item Á, we scan its tidset into memory. We insert item Á in an array indexed by tid for each Ì ¾ Ø Áµ. For example, consider the tidset for item, given as Ø µ ½. We read the first tid Ì ½, and then insert in the array at index ½. We also insert at indices and. We repeat this process for all other items and their tidsets. Figure shows how the inversion process works after the addition of each item and the complete horizontal database recovered from the vertical tidsets for each item. Given the recovered horizontal database it is straightforward to update the count of pairs of items using an upper triangular array. dd dd dd dd T dd W T T W W 3 3 3 3 T 3 T W W T T W T T Figure : Vertical-to-Horizontal atabase Recovery Memory Management For initialization HRM scans the database once to compute the frequent pairs of items (note that finding the frequent items is virtually free in the vertical format; we can calculate the support directly from an index array that stores the tidset offsets for each item. If this index is not available, computing the frequent items will take an additional scan). Then, while processing each initial branch in the search lattice it needs to scan single item tidsets from disk for each unpruned sibling. HRM is fully scalable for large-scale database mining. It implements appropriate memory management in all phases as described next. For example, while recovering the horizontal database, the entire database will clearly not fit in memory. HRM handles this by only recovering a block of transactions at one time that will fit in memory. Support of item pairs is updated by incrementally processing each recovered block. Note that regardless of the number of blocks, this process requires exactly one database scan over the vertical format (imagine pointers for each of tidsets; the pointer only moves forward if the tid is points to belongs to the current block).

When the number of closed itemsets itself becomes very large, we cannot hope to keep the set of all closed itemsets in memory. In this case, the elimination of some non-closed itemsets is done off-line in a post-processing step. Instead of inserting in in Line 9, we simply write it to disk along with its support and hash value. In the post-processing step, we read all close itemsets and apply the same hash table searching approach described above to eliminate non-closed itemsets. Since HRM processes each branch in the search in a depth-first fashion, its memory requirements are not substantial. It has to retain all the itemset-tidsets pairs on the levels of the current left-most branches in the search space. onsider 7 for example. Initially is has to retain the tidsets for Ì Ï, Ì Ï, Ì Ï, and Ì Ï. Once has been processed, the memory requirement shrinks to Ì - Ï, Ì Ì, and Ì Ï. In any case this is the worst possible situation. In practice the applications of subset infrequency and non-closure properties,, and 3, prune many branches in the search lattice. For cases where even the memory requirement of depth-first search exceed available memory, it is straightforward to modify HRM to write temporary tidsets to disk. For example, while processing the branch, we might have to write out the tidsets for Ì Ï to disk. nother option is to simply re-compute the intersections if writing temporary results is too expensive..3 orrectness and Efficiency Theorem 3 (correctness) The HRM algorithm enumerates all closed frequent itemsets. PROOF: HRM correctly identifies all and only the closed frequent itemsets, since its search is based on a complete subset lattice search. The only branches that are pruned as those that either do not have sufficient support, or those that result in non-closure based on the properties of itemset-tidset pairs as outlined at the beginning of this section. Finally HRM eliminates the few cases of non-closed itemsets that might be generated by performing subsumption checking before inserting anything in the set of all closed frequent itemsets. Theorem (computational cost) The running time of HRM is Ç Ð µ, where Ð is the average tidset length, and is the set of all closed frequent itemsets. PROOF: Note that starting with the single items and their associated tidsets, as we process a branch the following cases might occur. Let denote the current branch and the sibling we are trying to combine it with. We prune the branch if Ø µ Ø µ (Property ). We extend to become if Ø µ Ø µ (Property ). We prune if Ø µ Ø µ, and we extend to become Ø µ Ø µ (Property 3). Finally a new node is only generated if we get a new possibly closed set due to properties 3 and. lso note that each new node in fact represents a closed tidset, and thus indirectly represents a closed itemset, since there exists a unique closed itemset for each closed tidset. Thus HRM performs on the order of Ç µ intersections (we confirm this via experiments in Section ; the only extra intersections performed are due to case where HRM may produce non-closed itemsets like Ì Ï ½, which are eliminated in Line 9). If each tidset is on average of length Ð, an intersection costs at most ¾ Ð. The total running time of HRM is thus ¾ Ð or Ç Ð µ. Theorem (I/O cost) The number of database scans made by HRM is given as Ç µ, where is the set of all «Á closed frequent itemsets, Á is the set of items, and «is the fraction of database that fits in memory. PROOF: The number of database scans required is given as the total memory consumption of the algorithm divided by the fraction of database that will fit in memory. Since HRM computes on the order of Ç µ intersections, the total memory requirement of HRM is Ç Ð µ, where Ð is the average length of a tidset. Note that as we perform intersections the size of longer itemsets tidsets shrinks rapidly, but we ignore such effects in our analysis (it is thus a pessimistic bound). The total database size is Ð Á, and the fraction that fits in memory is given as «Ð Á. The number of data scans is then given as Ð µ «Ð Á µ «Á µ. Note that in the worst case can be exponential in Á, but this is rarely the case in practice. We will show in the experiments section that HRM makes very few database scans when compared to the longest closed frequent itemset found. 3

Related Work number of algorithms for mining frequent itemsets [,, 3, 9,, 3,, 9] have been proposed in the past. priori [] was the first efficient and scalable method for mining associations. It starts by counting frequent items, and during each subsequent pass it extends the current set of frequent itemsets by one more item, until no more frequent itemsets are found. Since it uses a pure bottom-up search over the subset lattice (see Figure 7), it generates all ¾ Ð subsets of a frequent itemset of length Ð. Other methods including HP [3], Partition [], S-P [], and I [3], propose enhancements over priori in terms of the number of candidates counted or the number of data scans. But they still have to generate all subsets of a frequent itemset. This is simply not feasible (except for very high support) for the kinds of dense datasets we examine in this paper. We use priori as a representative of this class of methods in our experiments. Methods for finding the maximal frequent itemsets include ll-mfs [8], which is a randomized algorithm, and as such not guaranteed to be complete. Pincer-Search [9] not only constructs the candidates in a bottom-up manner like priori, but also starts a top-down search at the same time. Our previous algorithms (Max)Eclat and Max(lique) [9, 7] range from those that generate all frequent itemsets to those that generate a few long frequent itemsets and other subsets. MaxMiner [] is another algorithm for finding the maximal elements. It uses novel superset frequency pruning and support lower-bounding techniques to quickly narrow the search space. Since these methods mine only the maximal frequent itemsets, they cannot be used to generate all possible association rules, which requires the support of all subsets in the traditional approach. If we try to compute the support of all subsets of the maximal frequent itemsets, we again run into the problem of generating all ¾ Ð subsets for an itemset of length Ð. For dense datasets this is impractical. Using MaxMiner as a representative of this class of algorithms we show that modifying it to compute closed itemsets renders it infeasible for all except very high supports. Find Generators ompute losures {} W x 3 x 3 T W T W x T x 3 W x 3 T TW x 3 T W T W T W TW 3 3 3 W TW W x TW x 3 Figure 3: lose lgorithm: Example lose [] is an priori-like algorithm that directly mines closed frequent itemsets. There are two main steps in lose. The first is to use a bottom-up search to identify generators, the smallest frequent itemsets that determines a closed itemset via the closure operator Ø. For example, in our example database, both Ø µ Ï and Ø µ Ï, but only is a generator for Ï. ll generators are found using a simple modification of priori. Each time a new candidate set is generated, lose computes their support, pruning all infrequent ones. For the remaining sets, it compares the support of each frequent itemset with each of its subsets at the previous level. If the support of an itemset matches the support of any of its subsets, the itemset cannot be a generator and is thus pruned. This process is repeated until no more generators can be produced. The second step in lose is to compute the closure of all the generators found in the first step. To compute the closure of an itemset we have to perform an intersection of all transactions where it occurs as a subset, i.e., the closure of an itemset is given as Ì Ø µ Ì µ Ì µ, where Ì is a tid. The closures for all generators can be computed in just one database scan, provided all generators fit in memory. Nevertheless computing closures this way is an expensive operation. Figure 3 shows the working of lose on our example database. fter generating candidate pairs of items, it is determined that and Ì are not frequent, so they are pruned. The remaining frequent pairs are pruned if their

support matches the support of any of their subsets. Ï are pruned, since their support is equal to the support of. is pruned because of, Ì because of Ì, and Ï because of Ï. fter this pruning, we find that no more candidates can be generated, marking the end of the first step. In the second step, lose computes the closure of all unpruned itemsets. Finally some duplicate closures are removed (e.g., both Ì and Ì Ï produce the same closure). We will show that while lose is much better than priori, it is uncompetitive with HRM. number of previous algorithms have been proposed for generating the Galois lattice of concepts [, ]. These algorithms will have to be adapted to enumerate only the frequent concepts. Further, they have only been studied on very small datasets. Finally the problem of generating a basis (a minimal non-redundant rule set) for association rules was discussed in [8] (but no algorithms were given), which in turn is based on the theory developed in [7,, ]. Experimental Evaluation We chose several real and synthetic datasets for testing the performance of HRM. The real datasets are the same as those used in MaxMiner []. ll datasets except the PUMS (pumsb and pumsb*) sets, are taken from the U Irvine Machine Learning atabase Repository. The PUMS datasets contain census data. pumsb* is the same as pumsb without items with 8% or more support. The mushroom database contains characteristics of various species of mushrooms. Finally the connect and chess datasets are derived from their respective game steps. Typically, these real datasets are very dense, i.e., they produce many long frequent itemsets even for very high values of support. These datasets are publicly available from IBM lmaden (www.almaden.ibm.com/cs/quest/demos.html). We also chose a few synthetic datasets (also available from IBM lmaden), which have been used as benchmarks for testing previous association mining algorithms. These datasets mimic the transactions in a retailing environment. Usually the synthetic datasets are sparse when compared to the real sets, but we modified the generator to produce longer frequent itemsets. atabase # Items vg. Record Length # Records Scaleup B Size chess 7 37 3,9 3,9 connect 3 3 7,7 7,7 mushroom 3 8, 8, pumsb* 77 9, 9, pumsb 77 7 9, 9, TIK,,, T3I8K 3,,, TI8K,,, Table : atabase haracteristics Table also shows the characteristics of the real and synthetic datasets used in our evaluation. It shows the number of items, the average transaction length and the number of transactions in each database. It also shows the number of records used for the scaleup experiments below. s one can see the average transaction size for these databases is much longer than conventionally used in previous literature. ll experiments described below were performed on a MHz Pentium P with MB of memory, running RedHat Linux.. lgorithms were coded in ++.. Effect of Branch Ordering Figure shows the effect on running time if we use various kinds of branch orderings in HRM. We compare three ordering methods lexicographical order, increasing by support, and decreasing by support. We observe that decreasing order is the worst. On the other hand processing branch itemsets in increasing order is the best; it is about a factor of. times better than lexicographic order and about times better than decreasing order. Similar results were obtained for synthetic datasets. ll results for HRM reported below use the increasing branch ordering, since it is the best.