You have seen that you can control the number of rules by specifying settings
for minimum support, minimum confidence, and maximum rule length. However,
a further (and very effective) way exists: you can apply an item constraint.
A general introduction is provided in Rule filtering.
To set item constraints define the constraint type in the
DM_RuleSettings value
by using the method
DM_setConType(type), and retrieve it
by using
DM_getConType. Set up the list of items and categories
in the
DM_RuleSettings value by repeatedly calling the method
DM_addConItem(item).
To remove an item, use the method
DM_remConItem(item). The
method
DM_getNumConItem returns the total number of items
in the constraint list, and
DM_getConItem returns an item
from this list. These latter methods take a parameter whose value ranges from
1 to the total number of items.
Note: - The item names are case sensitive.
- For the item constraints you must state the correct item name, that is,
if you choose the item format field name = field value, you
must not omit the field name or field value or the equal sign. Vice versa,
if you define the item name as field value or field
name, you must not add the field name or field value, respectively.
- If a name mapping is defined for the field in the logical data specification,
the field value is built from the mapped field value rather than the original
field value.
For example, a field 'Account Type' contains
the field value 'C1'. You define the item name as field
name = field value. A name mapping exists for this field that maps 'C1' to 'Checking
Basic'. The resulting item name for the definition of the item constraints
is 'Account Type = Checking Basic'.
- If you want to add a category of your taxonomy to the list of item constraints,
you must build the correct category name the same way you build your item
names, that is, you might have to add the field name or replace the category
name by the mapped category name.
- If you choose the item format [fieldname = field value] and
you want to exclude all items whose names are built from the same field value
but different fieldnames you must not state all item names individually.
You can replace the fieldname by "*" when you define
the item constraint. The Association mining function replaces the '*' by
a list of all active item field names.
For example, if you replace all
NULL values in Table 5 by "N" to indicate that the customer has not used the product, you get rules of
the type [saving account = N] ==> [credit card = N], because
the field value "N" is neither NULL, an empty String, nor
a blank string. You can suppress these rules when you apply an excluding item
constraint [* = N]. All rules that have items of the type [...
= N] are excluded from the result.