We present a small example database in Table 1 to illustrate the support and confidence measures. There are five transactions in the database, so the support of each itemset is measured relative to 5.
Transaction ID | Items |
T1 | A, C, D |
T2 | B, E |
T3 | A, B, C, E |
T4 | B, E |
T5 | B, D, F |
Table 1
Table 2 shows the supports of the 6 items in the database. The first column lists the item, the second lists the number of transactions in which the item appears, and the third column lists the support of the item. Item A in the first row, for example, appears in 2 transactions in Table 1 (transactions T1 and T3). This represents 40% of the 5 total transactions.
Item | Number of transactions | Support sup(X) |
A | 2 | 40% |
B | 4 | 80% |
C | 2 | 40% |
D | 2 | 40% |
E | 3 | 60% |
F | 1 | 20% |
Table 2
Table 3 shows the support for some itemsets derived from the database. The columns are analogous to those in Table 2. For example, the itemset {A, B} in the second row appears in only one transaction, transaction T3, which gives it a support of 20%.
Itemset | Number of Transactions | Support sup(X) |
A, C | 2 | 40% |
A, B | 1 | 20% |
B, D | 1 | 20% |
C, D | 1 | 20% |
A, B, C | 1 | 20% |
A, B, E | 1 | 20% |
A, C, D | 1 | 20% |
B, D, F | 1 | 20% |
A, B, C, E | 1 | 20% |
Table 3
Table 4 shows the confidence measures of several association rules derived from the itemsets in Table 3. The confidence of 100% for the rule A® C means that in every transaction in which A appears, C also appears. The confidence of this rule can be calculated by dividing the number of transactions in which the itemset {A, C} appears, which is 2 (see Table 3), by the number of transactions in which the item A appears, also 2 (Table 2).
Association Rule | Confidence conf(X® Y) |
A® C | 100% |
A® B | 50% |
B® D | 25% |
A, B® C | 100% |
A, C® B | 50% |
B, E® A | 33% |
Table 4