Mining Sequences. Examples of Sequence Web sequence:  {Homepage} {Electronics} {Digital Cameras} {Canon Digital Camera} {Shopping Cart} {Order Confirmation}

Slides:



Advertisements
Similar presentations
Mining Sequence Data. © Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Sequence Data ObjectTimestampEvents A102, 3, 5 A206, 1 A231 B114,
Advertisements

Association Rule and Sequential Pattern Mining for Episode Extraction Jonathan Yip.
Data Mining (Apriori Algorithm)DCS 802, Spring DCS 802 Data Mining Apriori Algorithm Spring of 2002 Prof. Sung-Hyuk Cha School of Computer Science.
IT 433 Data Warehousing and Data Mining Association Rules Assist.Prof.Songül Albayrak Yıldız Technical University Computer Engineering Department
Mining Graphs.
Data Mining Association Analysis: Basic Concepts and Algorithms
Rakesh Agrawal Ramakrishnan Srikant
Association Analysis. Association Rule Mining: Definition Given a set of records each of which contain some number of items from a given collection; –Produce.
Data Mining Techniques So Far: Cluster analysis K-means Classification Decision Trees J48 (C4.5) Rule-based classification JRIP (RIPPER) Logistic Regression.
Data Mining Association Analysis: Basic Concepts and Algorithms Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach, Kumar Introduction.
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
Generalized Sequential Pattern (GSP) Step 1: – Make the first pass over the sequence database D to yield all the 1-element frequent sequences Step 2: Repeat.
Ex. 11 (pp.409) Given the lattice structure shown in Figure 6.33 and the transactions given in Table 6.24, label each node with the following letter(s):
Association Analysis (7) (Mining Graphs)
Data Mining Association Analysis: Basic Concepts and Algorithms
Temporal Pattern Matching of Moving Objects for Location-Based Service GDM Ronald Treur14 October 2003.
4/3/01CS632 - Data Mining1 Data Mining Presented By: Kevin Seng.
Data Mining Association Analysis: Basic Concepts and Algorithms
ACCTG 6910 Building Enterprise & Business Intelligence Systems (e.bis)
Review.
Data Mining Association Rules: Advanced Concepts and Algorithms
Data Mining Association Rules: Advanced Concepts and Algorithms Lecture Notes for Chapter 7 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
1 Fast Algorithms for Mining Association Rules Rakesh Agrawal Ramakrishnan Srikant Slides from Ofer Pasternak.
Mining Sequential Patterns: Generalizations and Performance Improvements R. Srikant R. Agrawal IBM Almaden Research Center Advisor: Dr. Hsu Presented by:
Data Mining Association Rules: Advanced Concepts and Algorithms
Advanced Association Rule Mining and Beyond. Continuous and Categorical Attributes Example of Association Rule: {Number of Pages  [5,10)  (Browser=Mozilla)}
October 2, 2015 Data Mining: Concepts and Techniques 1 Data Mining: Concepts and Techniques — Chapter 8 — 8.3 Mining sequence patterns in transactional.
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining By Tan, Steinbach, Kumar Lecture.
Modul 7: Association Analysis. 2 Association Rule Mining  Given a set of transactions, find rules that will predict the occurrence of an item based on.
Mining Sequential Patterns Rakesh Agrawal Ramakrishnan Srikant Proc. of the Int ’ l Conference on Data Engineering (ICDE) March 1995 Presenter: Sam Brown.
Modul 8: Sequential Pattern Mining. Terminology  Item  Itemset  Sequence (Customer-sequence)  Subsequence  Support for a sequence  Large/frequent.
Data Mining Association Rules: Advanced Concepts and Algorithms Lecture Notes for Chapter 7 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
Data Mining Association Rules: Advanced Concepts and Algorithms
Data Mining Association Analysis Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach, Kumar Introduction to Data Mining 4/18/
Data Mining Association Rules: Advanced Concepts and Algorithms Lecture Notes for Chapter 7 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
Modul 8: Sequential Pattern Mining
Mining Association Rules: Advanced Concepts and Algorithms Lecture Notes for Chapter 7 By Gun Ho Lee Intelligent Information Systems Lab.
Data & Text Mining1 Introduction to Association Analysis Zhangxi Lin ISQS 3358 Texas Tech University.
Sequential Pattern Mining
CSE4334/5334 DATA MINING CSE4334/5334 Data Mining, Fall 2014 Department of Computer Science and Engineering, University of Texas at Arlington Chengkai.
Data Mining Association Rules: Advanced Concepts and Algorithms Lecture Notes Introduction to Data Mining by Tan, Steinbach, Kumar.
Data Mining Association Rules: Advanced Concepts and Algorithms
Association Rule Mining Data Mining and Knowledge Discovery Prof. Carolina Ruiz and Weiyang Lin Department of Computer Science Worcester Polytechnic Institute.
1 1 MSCIT 5210: Knowledge Discovery and Data Mining Acknowledgement: Slides modified by Dr. Lei Chen based on the slides provided by Tan, Steinbach, Kumar.
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining: Association Analysis This lecture node is modified based on Lecture Notes for.
S EQUENTIAL P ATTERNS & THE GSP A LGORITHM BY : J OE C ASABONA.
Mining Frequent Patterns, Associations, and Correlations Compiled By: Umair Yaqub Lecturer Govt. Murray College Sialkot.
Intelligent Database Systems Lab Advisor : Dr.Hsu Graduate : Keng-Wei Chang Author : Salvatore Orlando Raffaele Perego Claudio Silvestri 國立雲林科技大學 National.
Course on Data Mining: Seminar Meetings Page 1/30 Course on Data Mining ( ): Seminar Meetings Ass. Rules EpisodesEpisodes Text Mining
Mining Sequential Patterns © Tan,Steinbach, Kumar Introduction to Data Mining 4/18/2004 Slides are adapted from Introduction to Data Mining by Tan, Steinbach,
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
COMP53311 Association Rule Mining Prepared by Raymond Wong Presented by Raymond Wong
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Association Rule Mining COMP Seminar BCB 713 Module Spring 2011.
1 Data Mining Lecture 6: Association Analysis. 2 Association Rule Mining l Given a set of transactions, find rules that will predict the occurrence of.
Chapter 3 Data Mining: Classification & Association Chapter 4 in the text box Section: 4.3 (4.3.1),
Mining Association Rules: Advanced Concepts and Algorithms
Data Mining Association Rules: Advanced Concepts and Algorithms
Frequent Pattern Mining
Advanced Pattern Mining 02
Association Analysis: Advance Concepts
Data Mining Association Analysis: Basic Concepts and Algorithms
Mining Sequential Patterns
Data Mining Association Rules: Advanced Concepts and Algorithms
CS 548 Sequence Mining Showcase By Bian Du, Wa Gao, and Cam Jones
Data Mining Association Analysis: Basic Concepts and Algorithms
Association Rule Mining
Presentation transcript:

Mining Sequences

Examples of Sequence Web sequence:  {Homepage} {Electronics} {Digital Cameras} {Canon Digital Camera} {Shopping Cart} {Order Confirmation} {Return to Shopping}  Purchase history of a given customer  {Java in a Nutshell, Intro to Servlets} {EJB Patterns},…  Sequence of classes taken by a computer science major:  {Algorithms and Data Structures, Introduction to Operating Systems} {Database Systems, Computer Architecture} {Computer Networks, Software Engineering} {Computer Graphics, Parallel Programming} … 

Formal Definition of a Sequence A sequence is an ordered list of elements (transactions) s = –Each element contains a collection of events (items) e i = {i 1, i 2, …, i k } –Each element is attributed to a specific time or location A k-sequence is a sequence that contains k events (items) Sequence E1 E2 E1 E3 E2 E3 E4 E2 Element (Transaction) Event (Item)

Formal Definition of a Subsequence A sequence  a 1 a 2 … a n  is contained in another sequence  b 1 b 2 … b m  (m ≥ n) if there exist integers i 1 < i 2 < … < i n such that a 1  b i1, a 2  b i2, …, a n  b in Data sequenceSubsequenceContained?  {2,4} {3,5,6} {8}  {2} {3,5}  Yes  {1,2} {3,4}  {1} {2}  No  {2,4} {2,4} {2,5}  {2} {4}  Yes Support of a subsequence w is the fraction of data sequences that contain w A sequential pattern is a frequent subsequence (i.e., a subsequence whose support is ≥ minsup)

Sequential Pattern Mining: Definition Given: –a database of sequences –a user-specified minimum support threshold, minsup Task: –Find all subsequences with support ≥ minsup Challenge: –Many more candidate sequential patterns than candidate itemsets.

Sequential Pattern Mining: Example Minsup = 50% i.e. min. sup. count = 2 Examples of Frequent Subsequences: s=60% s=80% s=60% Group TimestampEvents A11,2,4 A22,3 A35 B11,2 B22,3,4 C11,2 C22,3,4 C32,4,5 D12 D23, 4 D34, 5 E11, 3 E22, 4, 5 E.g. A: B: …

Extracting Sequential Patterns Given n events: i 1, i 2, i 3, …, i n Candidate 1-subsequences:,,, …, Candidate 2-subsequences:,, …,,, …, Candidate 3-subsequences:,, …,,, …,,, …,,, …

APRIORI-like Algorithm Make the first pass over the sequence database to yield all the 1-element frequent sequences Repeat until no new frequent sequences are found Candidate Generation: Merge pairs of frequent subsequences found in the (k-1) th pass to generate candidate sequences that contain k items Candidate Pruning: Prune candidate k-sequences that contain infrequent (k-1)- subsequences Support Counting: Make a new pass over the sequence database to find the support for these candidate sequences Eliminate candidate k-sequences whose actual support is less than minsup

Candidate Generation Base case (k=2): –Merging two frequent 1-sequences and will produce four candidate 2-sequences: –,,, General case (k>2): –A frequent (k-1)-sequence w 1 is merged with another frequent (k-1)-sequence w 2 to produce a candidate k-sequence if the subsequence obtained by removing the first event in w 1 is the same as the subsequence obtained by removing the last event in w 2 –The resulting candidate after merging is given by the sequence w 1 extended with the last event of w 2. –If the last two events in w 2 belong to the same element, then the last event in w 2 becomes part of the last element in w 1 –Otherwise, the last event in w 2 becomes a separate element appended to the end of w 1

Candidate Generation Examples Merging the sequences w 1 = and w 2 = will produce the candidate sequence because the last two events in w 2 (4 and 5) belong to the same element Merging the sequences w 1 = and w 2 = will produce the candidate sequence because the last two events in w 2 (4 and 5) do not belong to the same element Finally, the sequences and don’t have to be merged (Why?) Because removing the first event from the first sequence doesn’t give the same subsequence as removing the last event from the second sequence. If is a viable candidate, it will be generated by merging a different pair of sequences, and.

Example Frequent 3-sequences Candidate Generation Candidate Pruning

Timing Constraints Buyer A: Buyer B: … The sequential pattern of interest is which suggests that people who buy TV will also soon buy DVD player. A person who bought a TV ten years earlier should not be considered as supporting the pattern because the time gap between the purchases is too long.

Timing Constraints Data sequenceSubsequenceContained? {A B} {C} {D E} <= max-span <= max-gap max-gap = 2, max-span= 4

Timing Constraints Data sequenceSubsequenceContained? Yes {A B} {C} {D E} <= max-span <= max-gap max-gap = 2, max-span= 4

Timing Constraints Data sequenceSubsequenceContained? Yes No {A B} {C} {D E} <= max-span <= max-gap max-gap = 2, max-span= 4

Timing Constraints Data sequenceSubsequenceContained? Yes No Yes {A B} {C} {D E} <= max-span <= max-gap max-gap = 2, max-span= 4

Timing Constraints {A B} {C} {D E} <= max-span <= max-gap Data sequenceSubsequenceContained? Yes No Yes No max-gap = 2, max-span= 4

Mining Sequential Patterns with Timing Constraints Approach 1: –Mine sequential patterns without timing constraints –Postprocess the discovered patterns Approach 2: –Modify algorithm to directly prune candidates that violate timing constraints –Question: Does APRIORI principle still hold?

APRIORI Principle for Sequence Data Suppose: max-gap = 1 max-span = 5 support = 40% but support = 60% Problem exists because of max-gap constraint This problem can avoided by using the concept of a contiguous subsequence.

Contiguous Subsequences s is a contiguous subsequence of w = if any of the following conditions holds: 1.s is obtained from w by deleting an item from either e 1 or e k 2.s is obtained from w by deleting an item from any element e i that contains at least 2 items 3.s is a contiguous subsequence of s’ and s’ is a contiguous subsequence of w (recursive definition) Examples: s = –is a contiguous subsequence of,, and –is not a contiguous subsequence of and

Modified Candidate Pruning Step Modified APRIORI Principle –If a k-sequence is frequent, then all of its contiguous (k-1)- subsequences must also be frequent Candidate generation doesn’t change. Only pruning changes. Without maxgap constraint: –A candidate k-sequence is pruned if at least one of its (k-1)- subsequences is infrequent With maxgap constraint: –A candidate k-sequence is pruned if at least one of its contiguous (k-1)-subsequences is infrequent