IDAX.PREDICT_ASSOCRULES - Apply rules and patterns to new data

Use this stored procedure to apply the rules and patterns of an association rules model to other transactions.

You can apply all rules or only specific rules according to specified criteria.

Authorities

The privileges held by the authorization ID of the statement must include the IDAX_USER role. Additionally, you must be the owner of the model or have the SELECT privilege on the source model.

Syntax

IDAX.PREDICT_ASSOCRULES(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 association rules model that is to be applied.
Data type: VARCHAR(192)
intable
Mandatory.
The name of the input table.
Data type: VARCHAR(128)
outtable
Mandatory.
The name of the output table which the mapping between the input sequences and the associated rules or patterns is written to.
Data type: VARCHAR(128)
tid
Optional.
The column of the input table that identifies the transaction ID.
Default: the same tid column that is specified in the stored procedure to build the model.
Data type: VARCHAR(128)
item
Optional.
The column of the input table that identifies an item of the transaction.
Default: the same item column that is specified in the stored procedure to build the model.
Data type: VARCHAR(128)
type
Optional.
The type of information that is written to the output table.
Possible values are rules and patterns.
Default: rules
Data type: VARCHAR(8)
limit
Optional.
The maximum number of rules or patterns that is written to the output table for each input sequence.
Default: 1
Range: >=1
Data type: INTEGER
sort
Optional.
A list of keywords that indicate the order in which the rules or patterns are written to the output table. The order of the list is descending. The items are separated by semicolons.
Possible values are support, confidence, lift, and length.
The confidence value can only be specified if the type parameter is rules.
Default if the type parameter is rules: support;confidence;length
Default if the type parameter is patterns: support;lift;length
Data type: VARCHAR(32000)

Returned information

The number of input sequences for which at least one rule or pattern is returned as a result set.

The result set columns are as follows:

Table 1. Result set columns for the IDAX.LIST_COMPONENTS procedure
Column name Column type Description
Name of column as specified by the tid parameter Type of column as specified by the tid parameter The ID of the input transaction
RANK INTEGER The rank of the rule or pattern that is associated with this input transaction.

The order is specified by the sort parameter.

RULEID INTEGER The ID of the rule that is associated with this input transaction.

The column is only shown if the type parameter is rules.

ITEMSETID INTEGER The ID of the pattern that is associated with this input transaction.

The column is only shown if the type parameter is patterns.

PRINT VARCHAR The print form of the rule or pattern as returned by the PRINT_MODEL procedure
LENGTH INTEGER The number of items in the rule or pattern
SUPPORT DOUBLE The support of the rule or pattern
LIFT DOUBLE The lift of the rule or pattern
CONFIDENCE DOUBLE The confidence of the rule

The column is only shown if the type parameter is rules.

Example

CALL IDAX.PREDICT_ASSOCRULES('model=retail_assoc, intable=retail, outtable=retail_assoc_out');