|  | ## Generalized Sequential Patterns

#### Synopsis

This operator applies given association rules on an example set.

#### Description

This operator searches sequential patterns in a set of transactions. Each transaction must be encoded as an single example and must contain one attribute for the time and for the customer. This pair of attribute is used for generate one sequence per customer containing each single transaction ordered by the time of each transaction. The algorithm then searches sequential patterns in the form of: If a customer bought a and c in one transaction, he bought b in the next: <a, c> then <b>. The minimal support describes how many customer must support such a pattern for regarding it as frequent. Infrequent patterns will be dropped. A customer supports such a pattern, if there are some parts of his sequence including the pattern. The above pattern would be supported by a customer with this transactions: <s, g> then <a, s, c> then <b> then <f, h>.

The parameters min_gap, max_gap and window_size determine how transaction are handled. For example, if the above customer forgot to by c, and had to return 5 minutes later to buy c, then his transactions would look like that: <s, g> then <a, s> then <c> then <b> then <f ^111, h> This would not support the pattern <a, c> then <b>. To avoid this problem, the window size determines, how long a subsequent transaction is treated as the same transaction. If the window size is larger than 5 minutes, the <c> would be treated as being part of the second transaction and hence this customer would support the above pattern.

The max_gap parameter causes a customers sequence not to support a pattern, if the transactions containing this pattern are to widely separated in time. The min_gap parameter does the same if they are to near.

#### Input

- example set: expects: ExampleSetMetaData: #examples: = 0; #attributes: 0

, expects: ExampleSet, expects: ExampleSet

#### Output

- example set:
- patterns:

#### Parameters

- customer id: This attribute will be used to identify the customer of a transaction.
- time attribute: This numerical attribute specifies the time of a transaction.
- min support: This specifies the minimal support of a pattern
- window size: This specifies the window size
- max gap: This specifies the maximal gap
- min gap: This specifies the minimal gap
- positive value: This parameter determines, which value of the binominal attributes is treated as positive. Attributes with that value are considered as part of a transaction. If left blank, the example set determines, which is value is used.

#### ExampleProcess