You can build a sequence rule model by using the BuildSeqRuleModel procedure.
Syntax
IDMMX.BuildSeqRuleModel(<modelName>,
<inputTable>,
<sequenceColumn>,
<groupColumn>,
<minSupport>,
<minConfidence>,
<maxRuleLength>,
[,<optionsString>])
Input parameters
With the BuildSeqRuleModel procedure, you must specify the following parameters:
The model is stored in the IDMMX.RuleModels table. If a model with the same name already exists, the previous model is replaced with the new model.
This parameter is of type VARCHAR. Its size is 240.
The BuildSeqRuleModel procedure starts a mining run on this table.
The columns of the input table that are unlikely to be useful to create a model are ignored by the Easy Mining procedure. These are, for example, key columns.
This parameter is of type VARCHAR. Its size is 240.
A sequence contains the item sets that have the same sequence ID.
The remaining columns of the input table with the exception of the sequences column are used as item columns.
An item set contains items that have the same sequence ID and the same group ID.
The item sets in a sequence are sorted according to the value in the group column.
This parameter is of type VARCHAR. Its size is 128.
You can specify a value between 0 and 100. If you specify 0, the value for minimum support is automatically determined to produce a result that contains at least a few sequence rules.
This parameter is of type REAL.
You can specify a value between 0 and 100. If you specify 0, the default value of 25% is automatically used as the lower limit for the confidence of a sequence rule.
This parameter is of type REAL.
The rule length determines the maximum number of item sets that occur in a sequence rule. You must specify a value of at least 2. For example, if you specify 3 as the maximum rule length, the sequence rule might contain up to two item sets in the rule body and one item set in the rule head. If you specify a negative value or 0, the maximum rule length is not limited.
This parameter is of type INTEGER.
This parameter is of type VARCHAR. Its size is 32672.
Example
You might want to build the model BANK.PRODUCT_SEQ_RULES to compute the sequence rules for the products that are bought by bank customers.
call IDMMX.BuildSeqRuleModel('BANK.PRODUCT_SEQ_RULES',
'BANK.CUSTOMER_PRODUCTS2',
'CLIENT_ID',
'DATE',
5, 30, 3);
The FindSeqRules procedure uses sequence rules to find relationships in your data. Sequential relationships are represented as sequence rules. Sequence rules describe patterns in sequences. Depending on the business area, sequences might be, for example, purchases of customers or defects of cars over time.
<digital camera and rechargeable batteries> >>> <memory card> ==> <photo printer>where:
You can interpret the sequence rule above like this: If customers buy a digital camera together with rechargeable batteries at one purchase and a memory card in a later purchase, they will buy a photo printer during a subsequent purchase.
For example, in the sequence rule above, a confidence value of 50% means that 50% of the customers who bought a digital camera together with rechargeable batteries at one purchase and a memory card in a later purchase, bought a photo printer during a subsequent visit.
<digital camera and rechargeable batteries> => <memory card> =► <photo printer>
The lift value is computed by dividing the confidence value by the support value of the sequence rule head.
If the support value of the above example is 10% and the confidence value of the sequence rule is 50%, the value for lift is 50% divided by 10% = 5.
A lift value of 5 means, that customers who buy a digital camera together with rechargeable batteries at one purchase and a memory card in a later purchase, are 5 times more likely than average customers to buy a photo printer during a subsequent purchase.
If the type of the group column is numeric, this value is the mean value of the differences between pairs of subsequent groups of transactions.
If the type of the group column is numeric, this value is the standard deviation of the differences between pairs of subsequent groups of transactions.