print_apriori

Shows frequent itemsets and their support counts.

Syntax

print_apriori(predict)

Inputs

predict
Contains frequent itemsets, their support counts, and the size of each large set.
Type: struct
items
The frequent items.
Type: Boolean
Dimension: matrix
size
The size of each large set.
Type: integer
Dimension: vector
support
The support counts.
Type: integer
Dimension: vector

Example

Usage of print_apriori:

cdata = [1, 5, 7, 8 ; 1, 6, 9, 7; 9, 7, 3, 2; 2, 5, 7, 4; 5, 3, 7, 6];
bdata = one_hot_encode(cdata);
options = struct;
options.extract = 2;
predict = apriori(bdata, 0.1, options);
print_apriori(predict);

support count	itemset
[0.2]		[1 5]
[0.2]		[1 6]
[0.4]		[1 7]
[0.2]		[1 8]
[0.2]		[1 9]
[0.2]		[2 3]
[0.2]		[2 4]
[0.2]		[2 5]
[0.4]		[2 7]
[0.2]		[2 9]
[0.2]		[3 5]
[0.2]		[3 6]
[0.4]		[3 7]
[0.2]		[3 9]
[0.2]		[4 5]
[0.2]		[4 7]
[0.2]		[5 6]
[0.6]		[5 7]
[0.2]		[5 8]
[0.4]		[6 7]
[0.2]		[6 9]
[0.2]		[7 8]
[0.4]		[7 9]