print_assoc

Shows the rules generated using the frequent item sets and their support counts such as antecedent, consequent, confidence, support of antecedent and consequent, and lift.

Attention: Available only with Twin Activate commercial edition.

Syntax

print_assoc(rules)

Inputs

rules
Contains the antecedent, consequent, support counts of each, and their union, confidence, lift.
Type: struct

Example

Usage of print_assoc:

cdata = [1, 5, 7, 8; 1, 6, 9, 7; 9, 7, 3, 2];
bdata = one_hot_encode(cdata);
predict = apriori(bdata, 0.6);
options = struct;
options.min_lift = 0.5;
options.min_confidence = 0.08;
rules = assoc(predict, 0.05, options);
print_assoc(rules);

antecedents=>consequents 	ant_support/cons_support 	support/confidence/lift
[1]=>[7]			[0.666666667]/[1]		[0.666666667]/[1]/[1]
[7]=>[1]			[1]/[0.666666667]		[0.666666667]/[0.666666667]/[1]
[7]=>[9]			[1]/[0.666666667]		[0.666666667]/[0.666666667]/[1]
[9]=>[7]			[0.666666667]/[1]		[0.666666667]/[1]/[1]