Sequential Patterns The GSP Algorithm
Sequential Patterns The GSP Algorithm
BY: JOE
CASABONA
INTRO
What are Sequential Patterns? Why don't ARs suffice? The General Sequential Pattern Algorithm o Finding Frequent Sets o Candidate Generation o Rule Generation
OBJECTIVE
Given a set S of input data sequences, find all sequences that have a user-specified minimum support. This is called a 'frequent sequence' or sequential pattern. [1] We will use the Generalized Sequential Pattern Algorithm (GSP)
GSP
Similar to Apriori Algorithm Find individual items with minSupport (1-sequences) Use them to find 2-sequences Continue using k-sequences to find (k+1)-sequences Stop when there are no more frequent sequences. Difference is in Candidate Generation
Join F[k-1] with F[k-1] Get rid of infrequent sequences (prune) Note: Order of items matter
CANDIDATE EXAMPLE
F[3] = <{1, 2} {4}>, <{1, 2} {5}>, <{1} {4, 5}>, <{1, 4} {6}>, <{2} {4, 5}>, <{2} {4} {6}> After Join: <{1, 2} {4, 5}>, <{1, 2} { 4} {6}>
RULE GENERATION
Objective not to generate rules, but it can be done. Sequential Rule: Apply confidence to Frequent Sequences Label Sequential Rules: Replace some elements in X with *
RERERENCES
[1] The Book I am using: Liu, Bing. Web Data Mining, Chapter 2: Association Rules and Sequential Patterns. Springer, December, 2006 Wikipedia: [2] "GSP Algorithm." http://en.wikipedia.org/wiki/GSP_Algorithm June 3, 2008