<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=GSP_algorithm</id>
	<title>GSP algorithm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=GSP_algorithm"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=GSP_algorithm&amp;action=history"/>
	<updated>2026-10-25T14:52:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=GSP_algorithm&amp;diff=3500520&amp;oldid=prev</id>
		<title>imported&gt;PEPSI697: Reverted 1 edit by 2409:40C1:300E:5B3A:8000:0:0:0 (talk): Non constructive edit</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=GSP_algorithm&amp;diff=3500520&amp;oldid=prev"/>
		<updated>2024-11-19T05:38:21Z</updated>

		<summary type="html">&lt;p&gt;Reverted 1 edit by &lt;a href=&quot;/wiki143/index.php?title=Special:Contributions/2409:40C1:300E:5B3A:8000:0:0:0&quot; title=&quot;Special:Contributions/2409:40C1:300E:5B3A:8000:0:0:0&quot;&gt;2409:40C1:300E:5B3A:8000:0:0:0&lt;/a&gt; (&lt;a href=&quot;/wiki143/index.php?title=User_talk:2409:40C1:300E:5B3A:8000:0:0:0&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:2409:40C1:300E:5B3A:8000:0:0:0 (page does not exist)&quot;&gt;talk&lt;/a&gt;): Non constructive edit&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{More citations needed|date=May 2007}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GSP algorithm&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;Generalized Sequential Pattern&amp;#039;&amp;#039; algorithm) is an [[algorithm]] used for [[sequence mining]]. The algorithms for solving sequence mining problems are mostly based on the &amp;#039;&amp;#039;[[apriori algorithm|apriori]]&amp;#039;&amp;#039; (level-wise) algorithm. One way to use the level-wise paradigm is to first discover all the frequent items in a level-wise fashion. It simply means counting the occurrences of all singleton elements in the database. Then, the [[transaction (database)|transactions]] are filtered by removing the non-frequent items. At the end of this step, each transaction consists of only the frequent elements it originally contained. This modified database becomes an input to the GSP algorithm. This process requires one pass over the whole [[database]].&lt;br /&gt;
&lt;br /&gt;
GSP algorithm makes multiple database passes. In the first pass, all single items (1-sequences) are counted. From the frequent items, a set of candidate 2-sequences are formed, and another pass is made to identify their frequency. The frequent 2-sequences are used to generate the candidate 3-sequences, and this process is repeated until no more frequent sequences are found. There are two main steps in the algorithm.&lt;br /&gt;
* Candidate Generation. Given the set of frequent (k-1)-frequent sequences F&amp;lt;sub&amp;gt;k-1&amp;lt;/sub&amp;gt;, the candidates for the next pass are generated by joining F(k-1) with itself. A pruning phase eliminates any sequence, at least one of whose subsequences is not frequent.&lt;br /&gt;
* Support Counting. Normally, a [[Hash tree (persistent data structure)|hash tree]]&amp;amp;ndash;based search is employed for efficient support counting. Finally non-maximal frequent sequences are removed.&lt;br /&gt;
&lt;br /&gt;
== Algorithm ==&lt;br /&gt;
    F&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = the set of frequent 1-sequence&lt;br /&gt;
    k=2,&lt;br /&gt;
    do while F&amp;lt;sub&amp;gt;k-1&amp;lt;/sub&amp;gt; != Null;&lt;br /&gt;
        Generate candidate sets C&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt; (set of candidate k-sequences);&lt;br /&gt;
        For all input sequences s in the database D&lt;br /&gt;
        do&lt;br /&gt;
            Increment count of all a in C&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt; if s supports a&lt;br /&gt;
        End do&lt;br /&gt;
        Fk = {a ∈ C&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt; such that its frequency exceeds the threshold}&lt;br /&gt;
        k = k+1;&lt;br /&gt;
    End do&lt;br /&gt;
    Result = Set of all frequent sequences is the union of all F&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt;&amp;#039;s&lt;br /&gt;
&lt;br /&gt;
The above algorithm looks like the [[Apriori algorithm]]. One main difference is however the generation of candidate sets. Let us assume that:&lt;br /&gt;
::A → B and A → C&lt;br /&gt;
are two frequent 2-sequences. The items involved in these sequences are (A, B) and (A,C) respectively. The candidate generation in a usual Apriori style would give (A, B, C) as a 3-itemset, but in the present context we get the following 3-sequences as a result of joining the above 2- sequences&lt;br /&gt;
::A → B → C, A → C → B and A → BC&lt;br /&gt;
The candidate&amp;amp;ndash;generation phase takes this into account. The GSP algorithm discovers frequent sequences, allowing for time constraints such as maximum gap and minimum gap among the sequence elements. Moreover, it supports the notion of a sliding window, i.e., of a time interval within which items are observed as belonging to the same event, even if they originate from different events.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Sequence mining]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* R. Srikant and R. Agrawal. 1996. [http://www.rakesh.agrawal-family.com/papers/edbt96seq_rj.pdf Mining Sequential Patterns: Generalizations and Performance Improvements]. In Proceedings of the 5th International Conference on Extending Database Technology: Advances in Database Technology (EDBT &amp;#039;96), Peter M. G. Apers, Mokrane Bouzeghoub, and Georges Gardarin (Eds.). Springer-Verlag, London, UK, UK, 3–17.&lt;br /&gt;
* {{cite book |title=Data Mining Techniques |first=Arun K. |last=Pujari |publisher=Universities Press |year=2001 |ISBN=81-7371-380-4 |pages=256–260 |url={{Google books |dH2KQhJboSYC |plainurl=yes}}}}&lt;br /&gt;
* [https://doi.org/10.1023/A:1007652502315 Zaki, M.J. Machine Learning (2001) 42: 31].&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://www.philippe-fournier-viger.com/spmf/ SPMF] includes an open-source implementation of the GSP algorithm as well as [[PrefixSpan]], SPADE, SPAM, ClaSP, CloSpan and BIDE.&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Gsp Algorithm}}&lt;br /&gt;
[[Category:Data mining algorithms]]&lt;br /&gt;
[[Category:Articles with example pseudocode]]&lt;/div&gt;</summary>
		<author><name>imported&gt;PEPSI697</name></author>
	</entry>
</feed>