Research Report

Research Report

Research Rep ort MINING SEQUENTIAL PATTERNS: GENERALIZATIONS AND PERFORMANCE IMPROVEMENTS Ramakrishnan Srikant Rakesh Agrawal IBM Research Division Almaden Research Center 650 Harry Road San Jose, CA 95120-6099 LIMITED DISTRIBUTION NOTICE This rep ort has b een submitted for publication outside of IBM and will probably b e copyrighted if accepted for publication. It has b een issued as a Research Rep ort forearly dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should b e limited to p eer communications and sp eci c requests. After outside publication, requests should b e lled only by reprints or legally obtained copies of the article e.g., payment of royalties. Research Division IBM Yorktown Heights, New York San Jose, California Zurich, Switzerland MINING SEQUENTIAL PATTERNS: GENERALIZATIONS AND PERFORMANCE IMPROVEMENTS Ramakrishnan Srikant Rakesh Agrawal IBM Research Division Almaden Research Center 650 Harry Road San Jose, CA 95120-6099 ABSTRACT: The problem of mining sequential patterns was recently intro duced in [AS95]. We are given a database of sequences, where each sequence is a list of transac- tions ordered by transaction-time, and each transaction is a set of items. The problem is to discover all sequential patterns with a user-sp eci ed minimum supp ort, where the supp ort of a pattern is the numb er of data-sequences that contain the pattern. An example of a sequential pattern is \5 of customers b ought`Foundation' and `Ringworld' in one trans- action, followed by `Second Foundation' in a later transaction". We generalize the problem as follows. First, we add time constraints that sp ecify a minimum and/or maximum time p erio d b etween adjacent elements in a pattern. Second, we relax the restriction that the items in an element of a sequential pattern must come from the same transaction, instead allowing the items to b e present in a set of transactions whose transaction-times are within a user-sp eci ed time window. Third, given a user-de ned taxonomyis-a hierarchy on items, we allow sequential patterns to include items across all levels of the taxonomy. We present GSP, a new algorithm that discovers these generalized sequential patterns. Empirical evaluation using synthetic and real-life data indicates that GSP is much faster than the AprioriAll algorithm presented in [AS95]. GSP scales linearly with the number of data-sequences, and has very go o d scale-up prop erties with resp ect to the average data- sequence size. Also, Department of Computer Science, University of Wisconsin, Madison. 1. Intro duction Data mining, also known as knowledge discovery in databases, has b een recognized as a promising new area for database research. This area can b e de ned as eciently discovering interesting patterns from large databases. A new data mining problem, discovering sequential patterns,was intro duced in [AS95]. The input data is a set of sequences, called data-sequences. Each data-sequence is a list of transactions, where each transaction is a sets of literals, called items.Typically there is a transaction-time asso ciated with each transaction. A sequential pattern also consists of a list of sets of items. The problem is to nd all sequential patterns with a user-sp eci ed minimum support, where the supp ort of a sequential pattern is the p ercentage of data-sequences that contain the pattern. For example, in the database of a b o ok-club, each data-sequence may corresp ond to all b o ok selections of a customer, and each transaction to the b o oks selected by the customer in one order. A sequential pattern might b e \5 of customers b ought`Foundation', then `Foundation and Empire', and then `Second Foundation' ". The data-sequence corresp ond- ing to a customer who b ought some other b o oks in b etween these b o oks still contains this sequential pattern; the data-sequence may also have other b o oks in the same transaction as one of the b o oks in the pattern. Elements of a sequential pattern can b e sets of items, for example, \ `Foundation' and `Ringworld', followed by`Foundation and Empire' and `Ring- world Engineers', followed by `Second Foundation' ". However, all the items in an element of a sequential pattern must b e present in a single transaction for the data-sequence to supp ort the pattern. This problem was motivated by applications in the retailing industry, including attached mailing, add-on sales, and customer satisfaction. But the results apply to many scienti c and business domains. For instance, in the medical domain, a data-sequence may corresp ond to the symptoms or diseases of a patient, with a transaction corresp onding to the symptoms exhibited or diseases diagnosed during a visit to the do ctor. The patterns discovered using this data could b e used in disease research to help identify symptoms/diseases that precede certain diseases. However, the problem de nition as intro duced in [AS95] has the following limitations: 1. Absence of time constraints. Users often want to sp ecify maximum and/or min- 1 imum time gaps b etween adjacent elements of the sequential pattern. For example, a b o ok club probably do es not care if someone b ought\Foundation", followed by \Foundation and Empire" three years later; they maywant to sp ecify that a cus- tomer should supp ort a sequential pattern only if adjacent elements o ccur within a sp eci ed time interval, say three months. So for a customer to supp ort this pattern, the customer should have b ought\Foundation and Empire" within three months of buying \Foundation". 2. Rigid de nition of a transaction. For many applications, it do es not matter if items in an element of a sequential pattern were presentintwo di erent transactions, as long as the transaction-times of those transactions are within some small time window. That is, each element of the pattern can b e contained in the union of the items b ought in a set of transactions, as long as the di erence b etween the maximum and minimum transaction-times is less than the size of a sliding time window.For example, if the b o ok-club sp eci es a time windowofaweek, a customer who or- dered the \Foundation" on Monday, \Ringworld" on Saturday, and then \Foundation and Empire" and \Ringworld Engineers" in a single order a few weeks later would still supp ort the pattern \ `Foundation' and `Ringworld', followed by`Foundation and Empire' and `Ringworld Engineers' ". 3. Absence of taxonomies. Many datasets have a user-de ned taxonomyis-a hi- erarchy over the items in the data, and users want to nd patterns that include items across di erent levels of the taxonomy. An example of a taxonomy is given in Figure 1. With this taxonomy, a customer who b ought\Foundation" followed by \Perfect Spy" would supp ort the patterns \ `Foundation' followed by`Perfect Spy' ", \ `Asimov' followed by`Perfect Spy' ", \ `Science Fiction' followed by `Le Carre' ", etc. In this pap er, we generalize the problem de nition given in [AS95] to incorp orate time constraints, sliding time windows, and taxonomies in sequential patterns. We present GSP Generalized Sequential Patterns, a new algorithm that discovers all such sequential patterns. Empirical evaluation shows that GSP scales linearly with the numb er of data- sequences, and has very go o d scale-up prop erties with resp ect to the numb er of transactions p er data-sequence and numb er of items p er transaction. 2 Science Fiction Spy Asimov Niven Le Carre Foundation Foundation Second Ringworld Ringworld Perfect Spy Smiley's and Empire Foundation Engineers People Figure 1: Example of a Taxonomy 1.1. Related Work In addition to intro ducing the problem of sequential patterns, [AS95] presented three algorithms for solving this problem, but these algorithms do not handle time constraints, sliding windows, or taxonomies. Two of these algorithms were designed to nd only maxi- mal sequential patterns; however, many applications require all patterns and their supp orts. The third algorithm, AprioriAll, nds all patterns; its p erformance was b etter than or com- parable to the other two algorithms. We review AprioriAll in Section 4.1. Brie y, AprioriAll is a three-phase algorithm. It rst nds all itemsets with minimum supp ort frequent item- sets, transforms the database so that each transaction is replaced by the set of all frequent itemsets contained in the transaction, and then nds sequential patterns. There are two problems with this approach. First, it is computationally exp ensive to do the data trans- formation on-the- y during each pass while nding sequential patterns. The alternative, to transform the database once and store the transformed database, will b e infeasible or unre- alistic for many applications since it nearly doubles the disk space requirement which could b e prohibitive for large databases. Second, while it is p ossible to extend this algorithm to handle time constraints and taxonomies, it do es not app ear feasible to incorp orate sliding windows. For the cases that the extended AprioriAll can handle, our empirical evaluation rep orted in Section 4 shows that GSP is upto 20 times faster. Somewhat related to our work is the problem of mining asso ciation rules [AIS93]. As- so ciation rules are rules ab out what items are b ought together within a transaction, and are thus intra-transaction patterns, unlikeinter-transaction sequential patterns. The prob- lem of nding asso ciation rules when there is a user-de ned taxonomy on items has b een addressed in [SA95] [HF95].

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    31 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us