IDAX.SEQRULES - Build a sequential patterns model

Use this stored procedure to build a sequential patterns model.

Authorization

The privileges held by the authorization ID of the statement must include the IDAX_USER role.

Syntax

IDAX.SEQRULES(in parameter_string varchar(32672))

Parameter descriptions

parameter_string
Mandatory one-string parameter that contains pairs of <parameter>=<value> entries that are separated by a comma.
Data type: VARCHAR(32672)
The following list shows the parameter values:
model
Mandatory.
The name of the sequential patterns model that is to be built.
Data type: VARCHAR(192)
intable
Mandatory.
The name of the input table.
Data type: VARCHAR(128)
sid
Mandatory.
The column of the input table that identifies a sequence ID.
Type: VARCHAR(128)
tid
Mandatory.
The column of the input table that identifies a transaction of the sequence by ID or by time.
Data type: VARCHAR(128)
item
Mandatory.
The column of the input table that identifies an item of the transaction by ID or by name.
Data type: VARCHAR(128)
minsupport
Optional.
The minimum fraction (0 - 1) or the minimum number (above 1) of sequences that must contain a pattern to be considered frequent.
Default: system-determined
Range: >0 and <1 for a minimum fraction; >1 for a minimum number of sequences.
Data type: DOUBLE
maxlen
Optional.
The maximum length of a pattern or a rule, that is, the maximum number of items per pattern or rule.
Default: 5
Range: >=2
Data type: INTEGER
maxtime
Optional.
The maximum time difference that is allowed between the first transaction and the last transaction of a frequent pattern. Patterns in input sequences that are spread over a longer time period are ignored.
You cannot specify this parameter if the tid parameter is not numeric or of type date, time, or time stamp.
If the tid column is of type date, time, or time stamp, the unit of the maxtime parameter is seconds.
Default: no time limitation
Data type: DOUBLE
mingap
Optional.
The minimum time difference under which two transactions of an input sequence are merged. The items of the merged transactions are considered to belong to the first transaction.
You cannot specify this parameter if the tid parameter is not numeric or of type date, time, or time stamp.
If the tid column is of type date, or time, or time stamp, the unit of the mingap parameter is seconds.
Default: 0
Data type: DOUBLE
maxgap
Optional.
The maximum time difference that is allowed between two successive transactions of a frequent pattern. Patterns in input sequences that are spread over a longer time period are ignored.
You cannot specify this parameter if the tid parameter is not numeric or of type date or time.
If the tid column is of type date, or time, or time stamp, the unit of the maxgap parameter is seconds.
Default: No time limitation
Data type: DOUBLE
maxheadlen
Optional.
The maximum length of a rule head, that is, the maximum number of items that might belong to the item set on the right side of a rule.
Increasing this value might significantly increase the number of detected rules.
Default: 1
Range: >=1 and <maxlen
Data type: INTEGER
minconf
Optional.
The minimum confidence that a rule must achieve to be kept in the sequential patterns model.
Default: 0.5
Range: >= 0.0 and <= 1.0
Data type: DOUBLE
nametable
Optional.
The table that contains a mapping of the items in the input table and their names.
The table must contain at least two columns, where
  1. The first column has the same name as the column that is contained in the item parameter of the input table
  2. The second column has the same name as the name that is defined in the namecol parameter
Default: no table
Data type: VARCHAR(128)
namecol
Optional.
The column that contains the item name that is defined in the nametable parameter.
You cannot specify this parameter if the nametable parameter is not specified.
Default: name
Data type: VARCHAR(128)

Returned information

The number of rules that are detected as a result set.

Example

CALL IDAX.SEQRULES('model=retail_seqrules, intable=retail_seq, sid=sid tid=tid, item=item, minsupport=0.05, minconf=0.5');